aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r--arch/i386/kernel/traps.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index de5386b01d38..4624f8ca2459 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -386,8 +386,12 @@ void die(const char * str, struct pt_regs * regs, long err)
386#endif 386#endif
387 if (nl) 387 if (nl)
388 printk("\n"); 388 printk("\n");
389 notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); 389 if (notify_die(DIE_OOPS, str, regs, err,
390 show_registers(regs); 390 current->thread.trap_no, SIGSEGV) !=
391 NOTIFY_STOP)
392 show_registers(regs);
393 else
394 regs = NULL;
391 } else 395 } else
392 printk(KERN_EMERG "Recursive die() failure, output suppressed\n"); 396 printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
393 397
@@ -395,6 +399,9 @@ void die(const char * str, struct pt_regs * regs, long err)
395 die.lock_owner = -1; 399 die.lock_owner = -1;
396 spin_unlock_irqrestore(&die.lock, flags); 400 spin_unlock_irqrestore(&die.lock, flags);
397 401
402 if (!regs)
403 return;
404
398 if (kexec_should_crash(current)) 405 if (kexec_should_crash(current))
399 crash_kexec(regs); 406 crash_kexec(regs);
400 407
@@ -623,7 +630,7 @@ static DEFINE_SPINLOCK(nmi_print_lock);
623 630
624void die_nmi (struct pt_regs *regs, const char *msg) 631void die_nmi (struct pt_regs *regs, const char *msg)
625{ 632{
626 if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 0, SIGINT) == 633 if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 2, SIGINT) ==
627 NOTIFY_STOP) 634 NOTIFY_STOP)
628 return; 635 return;
629 636
@@ -662,7 +669,7 @@ static void default_do_nmi(struct pt_regs * regs)
662 reason = get_nmi_reason(); 669 reason = get_nmi_reason();
663 670
664 if (!(reason & 0xc0)) { 671 if (!(reason & 0xc0)) {
665 if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) 672 if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
666 == NOTIFY_STOP) 673 == NOTIFY_STOP)
667 return; 674 return;
668#ifdef CONFIG_X86_LOCAL_APIC 675#ifdef CONFIG_X86_LOCAL_APIC
@@ -678,7 +685,7 @@ static void default_do_nmi(struct pt_regs * regs)
678 unknown_nmi_error(reason, regs); 685 unknown_nmi_error(reason, regs);
679 return; 686 return;
680 } 687 }
681 if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP) 688 if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
682 return; 689 return;
683 if (reason & 0x80) 690 if (reason & 0x80)
684 mem_parity_error(reason, regs); 691 mem_parity_error(reason, regs);