From: Schspa Shi <schspa@gmail.com>
To: pmladek@suse.com, sergey.senozhatsky@gmail.com,
rostedt@goodmis.org, john.ogness@linutronix.de
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
bigeasy@linutronix.de, tglx@linutronix.de, schspa@gmail.com
Subject: [PATCH 5.15-rt] printk: fix suppressed message print when reboot/panic
Date: Mon, 21 Mar 2022 19:15:02 +0800 [thread overview]
Message-ID: <20220321111501.68241-1-schspa@gmail.com> (raw)
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@jogness.linutronix.de>
Signed-off-by: Schspa Shi <schspa@gmail.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
next reply other threads:[~2022-03-21 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 11:15 Schspa Shi [this message]
2022-03-21 13:04 ` [PATCH 5.15-rt] printk: fix suppressed message print when reboot/panic John Ogness
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220321111501.68241-1-schspa@gmail.com \
--to=schspa@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox