diff options
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r-- | kernel/printk/printk.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 1c6ed598b480..a8fab94f4c04 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -538,14 +538,12 @@ char *log_buf_addr_get(void) { return log_buf; } -EXPORT_SYMBOL_GPL(log_buf_addr_get); /* Return log buffer size */ u32 log_buf_len_get(void) { return log_buf_len; } -EXPORT_SYMBOL_GPL(log_buf_len_get); /* * Define how much of the log buffer we could take at maximum. The value @@ -3741,12 +3739,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(); |