diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-08 21:31:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-08 21:31:10 -0700 |
| commit | 7b78878b47141bb38c217d3d354adb24eb499e34 (patch) | |
| tree | 52f8b9a730e5e32c1377e26805aba6030b3a437d /kernel/sysctl.c | |
| parent | 2040ae819d46e22444db8cb92d01e298a9ca3b51 (diff) | |
[PATCH] Allow panics and reboots at oops time.
From: Russell Miller <rmiller@duskglow.com>
A BUG or an oops will often leave a machine in a useless state. There is no
way to remotely recover the machine from that state.
The patch adds a /proc/sys/kernel/panic_on_oops sysctl which, when set, will
cause the x86 kernel to call panic() at the end of the oops handler. If the
user has also set /proc/sys/kernel/panic then a reboot will occur.
The implementation will try to sleep for a while before panicing so the oops
info has a chance of hitting the logs.
The implementation is designed so that other architectures can easily do this
in their oops handlers.
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 27cd5c65124f..21381e2efa18 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -263,6 +263,8 @@ static ctl_table kern_table[] = { #endif {KERN_PIDMAX, "pid_max", &pid_max, sizeof (int), 0600, NULL, &proc_dointvec}, + {KERN_PANIC_ON_OOPS,"panic_on_oops", + &panic_on_oops,sizeof(int),0644,NULL,&proc_dointvec}, {0} }; |
