]> git.baikalelectronics.ru Git - kernel.git/commit
printk: fix exclusive_console replaying
authorJohn Ogness <john.ogness@linutronix.de>
Thu, 19 Dec 2019 11:53:22 +0000 (12:59 +0106)
committerPetr Mladek <pmladek@suse.com>
Thu, 2 Jan 2020 15:15:04 +0000 (16:15 +0100)
commit6bcf606ea3ba6354a9ef0285d306ee686ba9d2c9
treebe97123308121ba0ef1751ca879776e7228b2b9f
parentd7d6274b1de7433efbd7eac3f2a463fab6622250
printk: fix exclusive_console replaying

Commit 3f522cd064e4 ("printk: Do not miss new messages when replaying
the log") introduced a new variable @exclusive_console_stop_seq to
store when an exclusive console should stop printing. It should be
set to the @console_seq value at registration. However, @console_seq
is previously set to @syslog_seq so that the exclusive console knows
where to begin. This results in the exclusive console immediately
reactivating all the other consoles and thus repeating the messages
for those consoles.

Set @console_seq after @exclusive_console_stop_seq has stored the
current @console_seq value.

Fixes: 3f522cd064e4 ("printk: Do not miss new messages when replaying the log")
Link: http://lkml.kernel.org/r/20191219115322.31160-1-john.ogness@linutronix.de
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c