Skip to contentSkip to conversation

ia64: support panic_on_oops sysctl

PATCH New Horms 1 participant 1 message Feb 15, 2006

lore
Share & tools
lore

Horms

author
#0 lore raw

PATCH 1/1 ia64: support panic_on_oops sysctl

Trivial port of this feature from i386
As it stands, panic_on_oops but does nothing on ia64

arch/ia64/kernel/traps.c +8 -0
@@ -16,6 +16,7 @@
 #include <linux/module.h>       /* for EXPORT_SYMBOL */
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
+#include <linux/delay.h>		/* for ssleep() */
 
 #include <asm/fpswa.h>
 #include <asm/ia32.h>
@@ -116,6 +117,13 @@ die (const char *str, struct pt_regs *re
 	bust_spinlocks(0);
 	die.lock_owner = -1;
 	spin_unlock_irq(&die.lock);
+
+	if (panic_on_oops) {
+		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
+		ssleep(5);
+		panic("Fatal exception");
+	}
+
   	do_exit(SIGSEGV);
 }