aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPetr Mladek2023-10-11 12:58:14 +0200
committerPetr Mladek2023-10-11 12:58:14 +0200
commit9277abd2c17272ed8fc1b842d9efa45797435b77 (patch)
treeba81f29f1bbd2b025d04e0e0e0e368451f9c2d85 /kernel
parent01a46efcd8f4af44691d7273edf0c5c07dc9b619 (diff)
parent054c22bd784d6953ac85f545bed4a2a27b0e4ddb (diff)
Merge branch 'rework/misc-cleanups' into for-linus
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c8
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();