diff options
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 5 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 7 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 5a35975e5763..1b76d1574529 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -695,7 +695,8 @@ int __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) | |||
695 | */ | 695 | */ |
696 | local_inc(&__get_cpu_var(alert_counter)); | 696 | local_inc(&__get_cpu_var(alert_counter)); |
697 | if (local_read(&__get_cpu_var(alert_counter)) == 5*nmi_hz) | 697 | if (local_read(&__get_cpu_var(alert_counter)) == 5*nmi_hz) |
698 | die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs); | 698 | die_nmi("NMI Watchdog detected LOCKUP on CPU %d\n", regs, |
699 | panic_on_timeout); | ||
699 | } else { | 700 | } else { |
700 | __get_cpu_var(last_irq_sum) = sum; | 701 | __get_cpu_var(last_irq_sum) = sum; |
701 | local_set(&__get_cpu_var(alert_counter), 0); | 702 | local_set(&__get_cpu_var(alert_counter), 0); |
@@ -765,7 +766,7 @@ static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | |||
765 | char buf[64]; | 766 | char buf[64]; |
766 | 767 | ||
767 | sprintf(buf, "NMI received for unknown reason %02x\n", reason); | 768 | sprintf(buf, "NMI received for unknown reason %02x\n", reason); |
768 | die_nmi(buf,regs); | 769 | die_nmi(buf, regs, 1); /* Always panic here */ |
769 | return 0; | 770 | return 0; |
770 | } | 771 | } |
771 | 772 | ||
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index dae10df60926..96f62a033242 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -570,7 +570,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
570 | do_exit(SIGSEGV); | 570 | do_exit(SIGSEGV); |
571 | } | 571 | } |
572 | 572 | ||
573 | void __kprobes die_nmi(char *str, struct pt_regs *regs) | 573 | void __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic) |
574 | { | 574 | { |
575 | unsigned long flags = oops_begin(); | 575 | unsigned long flags = oops_begin(); |
576 | 576 | ||
@@ -582,9 +582,8 @@ void __kprobes die_nmi(char *str, struct pt_regs *regs) | |||
582 | show_registers(regs); | 582 | show_registers(regs); |
583 | if (kexec_should_crash(current)) | 583 | if (kexec_should_crash(current)) |
584 | crash_kexec(regs); | 584 | crash_kexec(regs); |
585 | if (panic_on_timeout || panic_on_oops) | 585 | if (do_panic || panic_on_oops) |
586 | panic("nmi watchdog"); | 586 | panic("Non maskable interrupt"); |
587 | printk("console shuts up ...\n"); | ||
588 | oops_end(flags); | 587 | oops_end(flags); |
589 | nmi_exit(); | 588 | nmi_exit(); |
590 | local_irq_enable(); | 589 | local_irq_enable(); |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 578596494275..cbf2669bca71 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -37,7 +37,7 @@ static inline void unset_nmi_pm_callback(struct pm_dev * dev) | |||
37 | #endif /* CONFIG_PM */ | 37 | #endif /* CONFIG_PM */ |
38 | 38 | ||
39 | extern void default_do_nmi(struct pt_regs *); | 39 | extern void default_do_nmi(struct pt_regs *); |
40 | extern void die_nmi(char *str, struct pt_regs *regs); | 40 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); |
41 | 41 | ||
42 | #define get_nmi_reason() inb(0x61) | 42 | #define get_nmi_reason() inb(0x61) |
43 | 43 | ||