All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Honour "panic_on_oops" sysctl on mips arch
@ 2006-07-20 16:52 Maxime Bizon
  2006-07-20 19:18 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Bizon @ 2006-07-20 16:52 UTC (permalink / raw)
  To: linux-mips


Hello all,

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


Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

--- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-21 11:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20 16:52 [PATCH] Honour "panic_on_oops" sysctl on mips arch Maxime Bizon
2006-07-20 19:18 ` Ralf Baechle
2006-07-21  9:28   ` reserved pages and zero pages question pulsar
2006-07-21 10:28     ` Thiemo Seufer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.