diff options
author | Maxime Bizon <mbizon@freebox.fr> | 2006-07-20 12:52:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-09-27 08:37:03 -0400 |
commit | d4fd1989ea142be620978dcac2e1b86929f3237a (patch) | |
tree | 58894f0c99bada929ea39bba0dce709fdf5510f2 /arch/mips/kernel/traps.c | |
parent | b278240839e20fa9384ea430df463b367b90e04e (diff) |
[MIPS] Honour "panic_on_oops" sysctl.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
22 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
23 | #include <linux/interrupt.h> | ||
23 | 24 | ||
24 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
25 | #include <asm/branch.h> | 26 | #include <asm/branch.h> |
@@ -292,6 +293,16 @@ NORET_TYPE void ATTRIB_NORET die(const char * str, struct pt_regs * regs) | |||
292 | printk("%s[#%d]:\n", str, ++die_counter); | 293 | printk("%s[#%d]:\n", str, ++die_counter); |
293 | show_registers(regs); | 294 | show_registers(regs); |
294 | spin_unlock_irq(&die_lock); | 295 | spin_unlock_irq(&die_lock); |
296 | |||
297 | if (in_interrupt()) | ||
298 | panic("Fatal exception in interrupt"); | ||
299 | |||
300 | if (panic_on_oops) { | ||
301 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | ||
302 | ssleep(5); | ||
303 | panic("Fatal exception"); | ||
304 | } | ||
305 | |||
295 | do_exit(SIGSEGV); | 306 | do_exit(SIGSEGV); |
296 | } | 307 | } |
297 | 308 | ||