aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r--arch/x86_64/kernel/traps.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 121646fc43f6..102736630002 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -586,11 +586,17 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
586asmlinkage void default_do_nmi(struct pt_regs *regs) 586asmlinkage void default_do_nmi(struct pt_regs *regs)
587{ 587{
588 unsigned char reason = 0; 588 unsigned char reason = 0;
589 int cpu;
590
591 cpu = smp_processor_id();
589 592
590 /* Only the BSP gets external NMIs from the system. */ 593 /* Only the BSP gets external NMIs from the system. */
591 if (!smp_processor_id()) 594 if (!cpu)
592 reason = get_nmi_reason(); 595 reason = get_nmi_reason();
593 596
597 if (!cpu_online(cpu))
598 return;
599
594 if (!(reason & 0xc0)) { 600 if (!(reason & 0xc0)) {
595 if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) 601 if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT)
596 == NOTIFY_STOP) 602 == NOTIFY_STOP)