Merge branch 'rework/misc-cleanups' into for-linus
authorPetr Mladek <pmladek@suse.com>
Wed, 11 Oct 2023 10:58:14 +0000 (12:58 +0200)
committerPetr Mladek <pmladek@suse.com>
Wed, 11 Oct 2023 10:58:14 +0000 (12:58 +0200)
kernel/printk/printk.c

index 7e0b4dd02398db9a6d12c47d5a8abc383bbcee69..0b3af1529778c0ffe58675af216faeba434aba5e 100644 (file)
@@ -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();