Skip to content

Commit

Permalink
kmsg: make sure all messages reach a newly registered boot console
Browse files Browse the repository at this point in the history
We suppress printing kmsg records to the console, which are already printed
immediately while we have received their fragments.

Newly registered boot consoles print the entire kmsg buffer during
registration. Clear the console-suppress flag after we skipped the record
during its first storage, so any later print will see these records as usual.

Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kay Sievers authored and Greg Kroah-Hartman committed Jul 6, 2012
1 parent cb424ff commit 68b6507
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,12 @@ void console_unlock(void)
*/
console_idx = log_next(console_idx);
console_seq++;
/*
* We will get here again when we register a new
* CON_PRINTBUFFER console. Clear the flag so we
* will properly dump everything later.
*/
msg->flags &= ~LOG_NOCONS;
goto skip;
}

Expand Down

0 comments on commit 68b6507

Please sign in to comment.