Skip to content

Commit 4524565

Browse files
committed
Merge tag 'printk-for-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk regression fix from Petr Mladek: - Avoid unnecessary wait and try to flush messages before checking pending ones * tag 'printk-for-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: flush consoles before checking progress
2 parents 1c8b86a + 9277abd commit 4524565

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernel/printk/printk.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3740,12 +3740,18 @@ static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progre
37403740

37413741
seq = prb_next_seq(prb);
37423742

3743+
/* Flush the consoles so that records up to @seq are printed. */
3744+
console_lock();
3745+
console_unlock();
3746+
37433747
for (;;) {
37443748
diff = 0;
37453749

37463750
/*
37473751
* Hold the console_lock to guarantee safe access to
3748-
* console->seq.
3752+
* console->seq. Releasing console_lock flushes more
3753+
* records in case @seq is still not printed on all
3754+
* usable consoles.
37493755
*/
37503756
console_lock();
37513757

0 commit comments

Comments
 (0)