diff options
author | Petr Mladek <pmladek@suse.com> | 2023-10-11 12:58:14 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2023-10-11 12:58:14 +0200 |
commit | 9277abd2c17272ed8fc1b842d9efa45797435b77 (patch) | |
tree | ba81f29f1bbd2b025d04e0e0e0e368451f9c2d85 | |
parent | 01a46efcd8f4af44691d7273edf0c5c07dc9b619 (diff) | |
parent | 054c22bd784d6953ac85f545bed4a2a27b0e4ddb (diff) |
Merge branch 'rework/misc-cleanups' into for-linus
-rw-r--r-- | kernel/printk/printk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 7e0b4dd02398..0b3af1529778 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3740,12 +3740,18 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre seq = prb_next_seq(prb); + /* Flush the consoles so that records up to @seq are printed. */ + console_lock(); + console_unlock(); + for (;;) { diff = 0; /* * Hold the console_lock to guarantee safe access to - * console->seq. + * console->seq. Releasing console_lock flushes more + * records in case @seq is still not printed on all + * usable consoles. */ console_lock(); |