提交 d4fd1989 编写于 作者: M Maxime Bizon 提交者: Ralf Baechle

[MIPS] Honour "panic_on_oops" sysctl.

Signed-off-by: NMaxime Bizon <mbizon@freebox.fr>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 b2782408
......@@ -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>
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册