summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/Kconfig6
-rw-r--r--kernel/panic.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index eb4b33725db1..13ba324f1981 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -737,6 +737,12 @@ config SYSCTL
config ANON_INODES
bool
+config PANIC_TIMEOUT
+ int "Default panic timeout"
+ default 0
+ help
+ Set default panic timeout.
+
menuconfig EMBEDDED
bool "Configure standard kernel features (for small systems)"
help
diff --git a/kernel/panic.c b/kernel/panic.c
index 96b45d0b4ba5..5fc6031d1958 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -29,7 +29,10 @@ static int pause_on_oops;
static int pause_on_oops_flag;
static DEFINE_SPINLOCK(pause_on_oops_lock);
-int panic_timeout;
+#ifndef CONFIG_PANIC_TIMEOUT
+#define CONFIG_PANIC_TIMEOUT 0
+#endif
+int panic_timeout = CONFIG_PANIC_TIMEOUT;
ATOMIC_NOTIFIER_HEAD(panic_notifier_list);