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 /include/linux | |
| 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 'include/linux')
| -rw-r--r-- | include/linux/kernel.h | 1 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f7f83f129d9f..94d476e7d80f 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -104,6 +104,7 @@ static inline void console_verbose(void) extern void bust_spinlocks(int yes); extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ +extern int panic_on_oops; extern int tainted; extern const char *print_tainted(void); diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 29a5f877d0f3..f6a32a5dc496 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -129,6 +129,7 @@ enum KERN_CADPID=54, /* int: PID of the process to notify on CAD */ KERN_PIDMAX=55, /* int: PID # limit */ KERN_CORE_PATTERN=56, /* string: pattern for core-file names */ + KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */ }; |
