]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/traps_32.c
Merge branch 'linus' into x86/nmi
[~andy/linux] / arch / x86 / kernel / traps_32.c
index 08d752de4eee307779ba20b31c3b1e7c006daa62..cf37d20b1ba747d47989923d62baeedf1e7c9b84 100644 (file)
@@ -756,9 +756,9 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
 
 static DEFINE_SPINLOCK(nmi_print_lock);
 
-void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg)
+void notrace __kprobes die_nmi(char *str, struct pt_regs *regs, int do_panic)
 {
-       if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) == NOTIFY_STOP)
+       if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, 2, SIGINT) == NOTIFY_STOP)
                return;
 
        spin_lock(&nmi_print_lock);
@@ -767,10 +767,12 @@ void notrace __kprobes die_nmi(struct pt_regs *regs, const char *msg)
        * to get a message out:
        */
        bust_spinlocks(1);
-       printk(KERN_EMERG "%s", msg);
+       printk(KERN_EMERG "%s", str);
        printk(" on CPU%d, ip %08lx, registers:\n",
                smp_processor_id(), regs->ip);
        show_registers(regs);
+       if (do_panic)
+               panic("Non maskable interrupt");
        console_silent();
        spin_unlock(&nmi_print_lock);
        bust_spinlocks(0);