From: Anton Blanchard <anton@samba.org>
To: akpm@linux-foundation.org, gregkh@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] panic: Call console_verbose in panic
Date: Tue, 11 May 2010 08:59:59 +1000 [thread overview]
Message-ID: <20100510225959.GC12203@kryten> (raw)
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);
next reply other threads:[~2010-05-10 23:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 22:59 Anton Blanchard [this message]
2010-05-10 23:10 ` [PATCH] panic: Call console_verbose in panic Greg KH
2010-05-12 23:39 ` Andrew Morton
2010-05-13 10:00 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100510225959.GC12203@kryten \
--to=anton@samba.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.