From: Maxime Bizon Date: Thu, 20 Jul 2006 16:52:02 +0000 (+0200) Subject: [MIPS] Honour "panic_on_oops" sysctl. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d4fd1989ea142be620978dcac2e1b86929f3237a;p=linux-beck.git [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 954a198494ef..368fdb779175 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); }