From: Helge Deller Date: Sat, 30 Sep 2006 13:45:58 +0000 (+0200) Subject: [PARISC] Honour "panic_on_oops" sysctl X-Git-Tag: v2.6.19-rc1~34^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22fced881122f7fc6f5f259dca03ac6d5c601404;p=linux-2.6 [PARISC] Honour "panic_on_oops" sysctl Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 77b28cb8ac..65cd6ca32f 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -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__);