From: Kay Sievers Date: Fri, 6 Jul 2012 16:50:09 +0000 (-0700) Subject: kmsg: make sure all messages reach a newly registered boot console X-Git-Tag: v3.5-rc7~29^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=68b6507dc554ba015b5ed5e13b1ed4993cdf4024;p=~emulex%2Finfiniband.git kmsg: make sure all messages reach a newly registered boot console 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/printk.c b/kernel/printk.c index be9a82b2f0b..f02f1f5ddc3 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1953,6 +1953,12 @@ skip: */ 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; }