Skip to content

Commit 4c30c6f

Browse files
Nishanth Aravamudantorvalds
authored andcommitted
kernel/printk: do not turn off bootconsole in printk_late_init() if keep_bootcon
It seems that 7bf6939 ("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: Nishanth Aravamudan <[email protected]> Cc: David S. Miller <[email protected]> Cc: Alan Cox <[email protected]> Cc: Greg KH <[email protected]> Acked-by: Fabio M. Di Nitto <[email protected]> Cc: <[email protected]> [2.6.39.x, 3.0.x] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4733123 commit 4c30c6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/printk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ static int __init printk_late_init(void)
16041604
struct console *con;
16051605

16061606
for_each_console(con) {
1607-
if (con->flags & CON_BOOT) {
1607+
if (!keep_bootcon && con->flags & CON_BOOT) {
16081608
printk(KERN_INFO "turn off boot console %s%d\n",
16091609
con->name, con->index);
16101610
unregister_console(con);

0 commit comments

Comments
 (0)