[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220321111501.68241-1-schspa@gmail.com>
Date: Mon, 21 Mar 2022 19:15:02 +0800
From: Schspa Shi <schspa@...il.com>
To: pmladek@...e.com, sergey.senozhatsky@...il.com,
rostedt@...dmis.org, john.ogness@...utronix.de
Cc: linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
bigeasy@...utronix.de, tglx@...utronix.de, schspa@...il.com
Subject: [PATCH 5.15-rt] printk: fix suppressed message print when reboot/panic
Update printk_seq for suppressed message.
When message is suppressed, printk_seq should be updated, otherwise
this message will be printed when reboot. This problem was introduced
in commit 3edc0c85d154 ("printk: Rebase on top of new ring buffer").
This patch apply fix to 5.15-rt according to
Message-ID: <87a6dj3b5c.fsf@...ness.linutronix.de>
Signed-off-by: Schspa Shi <schspa@...il.com>
---
kernel/printk/printk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 0cc8e8acf545..c3e245c95de4 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2255,8 +2255,12 @@ static int printk_kthread_func(void *data)
if (!(con->flags & CON_ENABLED))
continue;
- if (suppress_message_printing(r.info->level))
+ if (suppress_message_printing(r.info->level)) {
+ console_lock();
+ latched_seq_write(&con->printk_seq, seq);
+ console_unlock();
continue;
+ }
if (con->flags & CON_EXTENDED) {
len = info_print_ext_header(ext_text,
--
2.29.0
Powered by blists - more mailing lists