Commit 0eafa549 authored by Bernhard Walle's avatar Bernhard Walle Committed by james toy

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: default avatarBernhard Walle <bernhard@bwalle.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 35741bef
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment