aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@parisc-linux.org>2006-09-30 15:45:58 +0200
committerMatthew Wilcox <willy@parisc-linux.org>2006-10-04 06:51:35 -0600
commit22fced881122f7fc6f5f259dca03ac6d5c601404 (patch)
tree1b699099365e0c3003ac0bcc0cf604f2996808d8
parentdc02747da7897cb89b62bb08aeb06fa0bb1e7319 (diff)
downloadkernel_samsung_aries-22fced881122f7fc6f5f259dca03ac6d5c601404.zip
kernel_samsung_aries-22fced881122f7fc6f5f259dca03ac6d5c601404.tar.gz
kernel_samsung_aries-22fced881122f7fc6f5f259dca03ac6d5c601404.tar.bz2
[PARISC] Honour "panic_on_oops" sysctl
Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
-rw-r--r--arch/parisc/kernel/traps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 77b28cb..65cd6ca 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -16,6 +16,7 @@
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/timer.h>
+#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/smp.h>
@@ -245,6 +246,15 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
current->comm, current->pid, str, err);
show_regs(regs);
+ 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");
+ }
+
/* Wot's wrong wif bein' racy? */
if (current->thread.flags & PARISC_KERNEL_DEATH) {
printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);