aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-06 12:50:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-06 12:50:09 -0400
commit68b6507dc554ba015b5ed5e13b1ed4993cdf4024 (patch)
treed8713cbaf2f7a0778f1bc58c2c499c742c4c21f5 /kernel/printk.c
parentcb424ffe9f45ad80267f2a98fbd9bf21caa0ce22 (diff)
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/printk.c')
-rw-r--r--kernel/printk.c6
1 files changed, 6 insertions, 0 deletions
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:
1953 */ 1953 */
1954 console_idx = log_next(console_idx); 1954 console_idx = log_next(console_idx);
1955 console_seq++; 1955 console_seq++;
1956 /*
1957 * We will get here again when we register a new
1958 * CON_PRINTBUFFER console. Clear the flag so we
1959 * will properly dump everything later.
1960 */
1961 msg->flags &= ~LOG_NOCONS;
1956 goto skip; 1962 goto skip;
1957 } 1963 }
1958 1964