Add build option to to set the default panic timeout.
diff --git a/init/Kconfig b/init/Kconfig
index ebafac4..2c6453d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -907,6 +907,12 @@
config ANON_INODES
bool
+config PANIC_TIMEOUT
+ int "Default panic timeout"
+ default 0
+ help
+ Set default panic timeout.
+
menuconfig EXPERT
bool "Configure standard kernel features (expert users)"
help
diff --git a/kernel/panic.c b/kernel/panic.c
index 6923167..5578d0a 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -33,7 +33,10 @@
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;
EXPORT_SYMBOL_GPL(panic_timeout);
ATOMIC_NOTIFIER_HEAD(panic_notifier_list);