Skip to content

Commit

Permalink
[MIPS] Honour "panic_on_oops" sysctl.
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Maxime Bizon authored and Ralf Baechle committed Sep 27, 2006
1 parent b278240 commit d4fd198
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/spinlock.h>
#include <linux/kallsyms.h>
#include <linux/bootmem.h>
#include <linux/interrupt.h>

#include <asm/bootinfo.h>
#include <asm/branch.h>
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit d4fd198

Please sign in to comment.