From: Breno Leitao <leitao@debian.org>
To: John Ogness <john.ogness@linutronix.de>
Cc: Marco Elver <elver@google.com>, Petr Mladek <pmladek@suse.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
Dmitry Vyukov <dvyukov@google.com>,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
kernel-team@meta.com
Subject: Re: [PATCH] kcsan: Don't flush the consoles while holding report_lock
Date: Wed, 4 Nov 2026 03:23:23 -0800 [thread overview]
Message-ID: <ausVjB1FRmcgwFQ-@gmail.com> (raw)
In-Reply-To: <875wycc1jf.fsf@jogness.linutronix.de>
Hello John,
On Wed, Nov 04, 2026 at 11:57:32AM +0106, John Ogness wrote:
> On 2026-11-03, Breno Leitao <leitao@debian.org> wrote:
> > Since commit 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep
> > splats"), print_irqtrace_events() runs inside an nbcon emergency
> > section. In an emergency section, every printk() flushes all pending
> > records to the nbcon consoles from the calling context (instead of the
> > printk thread).
> >
> > With CONFIG_KCSAN_VERBOSE, print_report() calls print_irqtrace_events()
> > while holding the raw report_lock with interrupts disabled, so every
> > verbose report writes out the whole console backlog under report_lock,
> > as consoles/UARTs are usually slow, this is not good.
>
> I am fine with this patch, but am not happy about the motivation. You
> are right that it is "not good", but it is "not good" because the CPU is
> being put into an emergency state when it is not really an
> emergency. Even if the report_lock was not being held, this patch would
> be equally valid.
Agreed. A KCSAN report is not an emergency, so it should not enter an
emergency section in the first place. report_lock only made the problem
visible, by turning the console flush into a hard lockup.
I will reword the commit message around that in v2.
> I would even say this patch fixes 59cd94ef8009 because
> print_irqtrace_events() is not exclusively used for lockdep splats.
Makes sense, I will add:
Fixes: 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep splats")
Thanks for the review,
--breno
prev parent reply other threads:[~2026-11-04 11:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 17:22 Breno Leitao
2026-11-04 10:51 ` John Ogness
2026-11-04 11:23 ` Breno Leitao [this message]
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=ausVjB1FRmcgwFQ-@gmail.com \
--to=leitao@debian.org \
--cc=boqun@kernel.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=john.ogness@linutronix.de \
--cc=kasan-dev@googlegroups.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®