Thread (4 messages) 4 messages, 4 authors, 2006-07-21
STALE7253d

[PATCH] Honour "panic_on_oops" sysctl on mips arch

From: Maxime Bizon <hidden>
Date: 2006-07-20 16:52:16

Hello all,

The panic_on_oops sysctl has no effect on mips, the following patch
fixes it.


Signed-off-by: Maxime Bizon <redacted>
--- linux-2.6.17.6/arch/mips/kernel/traps.c.orig	2006-07-20 18:42:37.000000000 +0200
+++ linux-2.6.17.6/arch/mips/kernel/traps.c	2006-07-20 18:42:56.000000000 +0200
@@ -21,6 +21,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>
@@ -293,6 +294,16 @@
 	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);
 }
 

Regards,

-- 
Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help