]> err.no Git - linux-2.6/commitdiff
[PARISC] Honour "panic_on_oops" sysctl
authorHelge Deller <deller@parisc-linux.org>
Sat, 30 Sep 2006 13:45:58 +0000 (15:45 +0200)
committerMatthew Wilcox <willy@parisc-linux.org>
Wed, 4 Oct 2006 12:51:35 +0000 (06:51 -0600)
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
arch/parisc/kernel/traps.c

index 77b28cb8aca6f1cecab831f219308c787869e729..65cd6ca32fed57b689f8a2dec3449dd620e3f098 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/timer.h>
+#include <linux/delay.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/smp.h>
@@ -245,6 +246,15 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
                current->comm, current->pid, str, err);
        show_regs(regs);
 
+       if (in_interrupt())
+               panic("Fatal exception in interrupt");
+
+       if (panic_on_oops) {
+               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
+               ssleep(5);
+               panic("Fatal exception");
+       }
+
        /* Wot's wrong wif bein' racy? */
        if (current->thread.flags & PARISC_KERNEL_DEATH) {
                printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);