From d4fd1989ea142be620978dcac2e1b86929f3237a Mon Sep 17 00:00:00 2001 From: Maxime Bizon Date: Thu, 20 Jul 2006 18:52:02 +0200 Subject: [MIPS] Honour "panic_on_oops" sysctl. Signed-off-by: Maxime Bizon Signed-off-by: Ralf Baechle --- arch/mips/kernel/traps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 954a198494e..368fdb77917 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); } -- cgit v1.2.3