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 /kernel/printk | |
parent | Merge tag 'printk-for-6.6-fixup' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
parent | printk: flush consoles before checking progress (diff) | |
download | linux-9277abd2c17272ed8fc1b842d9efa45797435b77.tar.xz linux-9277abd2c17272ed8fc1b842d9efa45797435b77.zip |
Merge branch 'rework/misc-cleanups' into for-linus
Diffstat (limited to 'kernel/printk')
-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(); |