Although you could ask the kernel for panic-on-oops, it remained
non-functional because the architecture specific code fragment had
not been implemented. Add it, so it works as advertised.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
#include <linux/personality.h>
#include <linux/ptrace.h>
#include <linux/kallsyms.h>
+#include <linux/delay.h>
#include <linux/init.h>
#include <asm/atomic.h>
__die(str, err, thread, regs);
bust_spinlocks(0);
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);
}