lkml.org 
[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] panic: Call console_verbose in panic

Most distros turn the console verbosity down and that means a backtrace after
a panic never makes it to the console. I assume we haven't seen this because
a panic is often preceeded by an oops which will have called console_verbose.
There are however a lot of places we call panic directly, and they are
broken.

Use console_verbose like we do in the oops path to ensure a directly called
panic will print a backtrace.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-2.6/kernel/panic.c
===================================================================
--- linux-2.6.orig/kernel/panic.c 2010-05-09 09:13:06.000000000 +1000
+++ linux-2.6/kernel/panic.c 2010-05-09 09:14:13.000000000 +1000
@@ -87,6 +87,7 @@ NORET_TYPE void panic(const char * fmt,
*/
preempt_disable();

+ console_verbose();
bust_spinlocks(1);
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);

\
 
 \ /
  Last update: 2010-05-12 10:35    [W:0.042 / U:4.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site