summaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorJason Baron <jbaron@akamai.com>2013-11-25 23:23:04 +0000
committerIngo Molnar <mingo@kernel.org>2013-11-26 12:12:26 +0100
commit5800dc3cff87c3a1548382298bb16e1fb4ec7e32 (patch)
tree7495d7a91bbac6ab956cb0099ae023deb3a4db76 /kernel/panic.c
parentb975dc3689fc6a3718ad288ce080924f9cb7e176 (diff)
downloadlinux-5800dc3cff87c3a1548382298bb16e1fb4ec7e32.tar.gz
linux-5800dc3cff87c3a1548382298bb16e1fb4ec7e32.tar.bz2
linux-5800dc3cff87c3a1548382298bb16e1fb4ec7e32.zip
panic: Make panic_timeout configurable
The panic_timeout value can be set via the command line option 'panic=x', or via /proc/sys/kernel/panic, however that is not sufficient when the panic occurs before we are able to set up these values. Thus, add a CONFIG_PANIC_TIMEOUT so that we can set the desired value from the .config. The default panic_timeout value continues to be 0 - wait forever. Also adds set_arch_panic_timeout(new_timeout, arch_default_timeout), which is intended to be used by arches in arch_setup(). The idea being that the new_timeout is only set if the user hasn't changed from the arch_default_timeout. Signed-off-by: Jason Baron <jbaron@akamai.com> Cc: benh@kernel.crashing.org Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: mpe@ellerman.id.au Cc: felipe.contreras@gmail.com Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1a1674daec27c534df409697025ac568ebcee91e.1385418410.git.jbaron@akamai.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index c00b4ceb39e8..6d6300375090 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -33,7 +33,7 @@ static int pause_on_oops;
static int pause_on_oops_flag;
static DEFINE_SPINLOCK(pause_on_oops_lock);
-int panic_timeout;
+int panic_timeout = CONFIG_PANIC_TIMEOUT;
EXPORT_SYMBOL_GPL(panic_timeout);
ATOMIC_NOTIFIER_HEAD(panic_notifier_list);