Commit a4fe2b4d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'printk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk

Pull printk update from Petr Mladek:
 "Prevent replaying log on all consoles"

* tag 'printk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk:
  printk: fix exclusive_console replaying
parents 3893c202 def97da1
...@@ -2770,8 +2770,6 @@ void register_console(struct console *newcon) ...@@ -2770,8 +2770,6 @@ void register_console(struct console *newcon)
* for us. * for us.
*/ */
logbuf_lock_irqsave(flags); logbuf_lock_irqsave(flags);
console_seq = syslog_seq;
console_idx = syslog_idx;
/* /*
* We're about to replay the log buffer. Only do this to the * We're about to replay the log buffer. Only do this to the
* just-registered console to avoid excessive message spam to * just-registered console to avoid excessive message spam to
...@@ -2783,6 +2781,8 @@ void register_console(struct console *newcon) ...@@ -2783,6 +2781,8 @@ void register_console(struct console *newcon)
*/ */
exclusive_console = newcon; exclusive_console = newcon;
exclusive_console_stop_seq = console_seq; exclusive_console_stop_seq = console_seq;
console_seq = syslog_seq;
console_idx = syslog_idx;
logbuf_unlock_irqrestore(flags); logbuf_unlock_irqrestore(flags);
} }
console_unlock(); console_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment