Commit 4c30c6f5 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds

kernel/printk: do not turn off bootconsole in printk_late_init() if keep_bootcon

It seems that 7bf69395 ("console: allow to retain boot console via
boot option keep_bootcon") doesn't always achieve what it aims, as when
printk_late_init() runs it unconditionally turns off all boot consoles.
With this patch, I am able to see more messages on the boot console in
KVM guests than I can without, when keep_bootcon is specified.

I think it is appropriate for the relevant -stable trees.  However, it's
more of an annoyance than a serious bug (ideally you don't need to keep
the boot console around as console handover should be working -- I was
encountering a situation where the console handover wasn't working and
not having the boot console available meant I couldn't see why).
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <gregkh@suse.de>
Acked-by: default avatarFabio M. Di Nitto <fdinitto@redhat.com>
Cc: <stable@kernel.org>		[2.6.39.x, 3.0.x]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 47331231
...@@ -1604,7 +1604,7 @@ static int __init printk_late_init(void) ...@@ -1604,7 +1604,7 @@ static int __init printk_late_init(void)
struct console *con; struct console *con;
for_each_console(con) { for_each_console(con) {
if (con->flags & CON_BOOT) { if (!keep_bootcon && con->flags & CON_BOOT) {
printk(KERN_INFO "turn off boot console %s%d\n", printk(KERN_INFO "turn off boot console %s%d\n",
con->name, con->index); con->name, con->index);
unregister_console(con); unregister_console(con);
......
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