From: Bernhard Walle <bernhard@bwalle.de>
To: akpm@linuxfoundation.org
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org,
Bernhard Walle <bernhard@bwalle.de>
Subject: [PATCH 2/2] Always print panic message on current console
Date: Sun, 11 Oct 2009 23:04:31 +0200 [thread overview]
Message-ID: <1255295071-13664-3-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <1255295071-13664-1-git-send-email-bernhard@bwalle.de>
The kernel offers with TIOCL_GETKMSGREDIRECT ioctl() the possibility to
redirect the kernel messages to a specific console.
However, since it's not possible to switch to the kernel message console after
a panic(), it would be nice if the kernel would print the panic message on the
current console.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
kernel/panic.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index 96b45d0..3c84b01 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -22,6 +22,7 @@
#include <linux/init.h>
#include <linux/nmi.h>
#include <linux/dmi.h>
+#include <linux/vt.h>
int panic_on_oops;
static unsigned long tainted_mask;
@@ -65,6 +66,9 @@ NORET_TYPE void panic(const char * fmt, ...)
*/
preempt_disable();
+ /* don't redirect the panic message to some hidden console */
+ vt_kmsg_redirect(0);
+
bust_spinlocks(1);
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
--
1.6.3.3
prev parent reply other threads:[~2009-10-11 21:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-11 21:04 Bernhard Walle
2009-10-11 21:04 ` [PATCH 1/2] Introduce and use vt_kmsg_redirect() function Bernhard Walle
2009-10-11 21:04 ` Bernhard Walle [this message]
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=1255295071-13664-3-git-send-email-bernhard@bwalle.de \
--to=bernhard@bwalle.de \
--cc=akpm@linuxfoundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®