From: Maxime Bizon Date: Thu, 20 Jul 2006 16:52:02 +0000 (+0200) Subject: [MIPS] Honour "panic_on_oops" sysctl. X-Git-Tag: v2.6.19-rc1~1076 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4fd1989ea142be620978dcac2e1b86929f3237a;p=linux-2.6 [MIPS] Honour "panic_on_oops" sysctl. Signed-off-by: Maxime Bizon Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 954a198494..368fdb7791 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -292,6 +293,16 @@ NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs) printk("%s[#%d]:\n", str, ++die_counter); show_registers(regs); spin_unlock_irq(&die_lock); + + 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"); + } + do_exit(SIGSEGV); }