aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-02-10 14:35:36 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-02-10 14:35:36 -0500
commit4ba24fef3eb3b142197135223b90ced2f319cd53 (patch)
treea20c125b27740ec7b4c761b11d801108e1b316b2 /kernel/panic.c
parent47c1ffb2b6b630894e9a16442611c056ab21c057 (diff)
parent98a4a59ee31a12105a2b84f5b8b515ac2cb208ef (diff)
Merge branch 'next' into for-linus
Prepare first round of input updates for 3.20.
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index d09dc5c32c67..4d8d6f906dec 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -33,6 +33,7 @@ static int pause_on_oops;
33static int pause_on_oops_flag; 33static int pause_on_oops_flag;
34static DEFINE_SPINLOCK(pause_on_oops_lock); 34static DEFINE_SPINLOCK(pause_on_oops_lock);
35static bool crash_kexec_post_notifiers; 35static bool crash_kexec_post_notifiers;
36int panic_on_warn __read_mostly;
36 37
37int panic_timeout = CONFIG_PANIC_TIMEOUT; 38int panic_timeout = CONFIG_PANIC_TIMEOUT;
38EXPORT_SYMBOL_GPL(panic_timeout); 39EXPORT_SYMBOL_GPL(panic_timeout);
@@ -244,6 +245,7 @@ static const struct tnt tnts[] = {
244 * 'I' - Working around severe firmware bug. 245 * 'I' - Working around severe firmware bug.
245 * 'O' - Out-of-tree module has been loaded. 246 * 'O' - Out-of-tree module has been loaded.
246 * 'E' - Unsigned module has been loaded. 247 * 'E' - Unsigned module has been loaded.
248 * 'L' - A soft lockup has previously occurred.
247 * 249 *
248 * The string is overwritten by the next call to print_tainted(). 250 * The string is overwritten by the next call to print_tainted().
249 */ 251 */
@@ -427,6 +429,17 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
427 if (args) 429 if (args)
428 vprintk(args->fmt, args->args); 430 vprintk(args->fmt, args->args);
429 431
432 if (panic_on_warn) {
433 /*
434 * This thread may hit another WARN() in the panic path.
435 * Resetting this prevents additional WARN() from panicking the
436 * system on this thread. Other threads are blocked by the
437 * panic_mutex in panic().
438 */
439 panic_on_warn = 0;
440 panic("panic_on_warn set ...\n");
441 }
442
430 print_modules(); 443 print_modules();
431 dump_stack(); 444 dump_stack();
432 print_oops_end_marker(); 445 print_oops_end_marker();
@@ -484,6 +497,7 @@ EXPORT_SYMBOL(__stack_chk_fail);
484 497
485core_param(panic, panic_timeout, int, 0644); 498core_param(panic, panic_timeout, int, 0644);
486core_param(pause_on_oops, pause_on_oops, int, 0644); 499core_param(pause_on_oops, pause_on_oops, int, 0644);
500core_param(panic_on_warn, panic_on_warn, int, 0644);
487 501
488static int __init setup_crash_kexec_post_notifiers(char *s) 502static int __init setup_crash_kexec_post_notifiers(char *s)
489{ 503{