summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-06 09:50:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-06 09:50:09 -0700
commit68b6507dc554ba015b5ed5e13b1ed4993cdf4024 (patch)
treed8713cbaf2f7a0778f1bc58c2c499c742c4c21f5 /kernel
parentcb424ffe9f45ad80267f2a98fbd9bf21caa0ce22 (diff)
downloadop-kernel-dev-68b6507dc554ba015b5ed5e13b1ed4993cdf4024.zip
op-kernel-dev-68b6507dc554ba015b5ed5e13b1ed4993cdf4024.tar.gz
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 <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index be9a82b..f02f1f5 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;
}
OpenPOWER on IntegriCloud