From: Petr Mladek <pmladek@suse.com>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: Breno Leitao <leitao@debian.org>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
John Ogness <john.ogness@linutronix.de>,
Marco Elver <elver@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
kernel-team@meta.com
Subject: Re: [PATCH v3] lockdep: Move the emergency section out of print_irqtrace_events()
Date: Wed, 18 Nov 2026 13:52:40 +0100 [thread overview]
Message-ID: <av2fmGFra8di7Ir3@pathway.suse.cz> (raw)
In-Reply-To: <20261109-kcsan-irqtrace-emergency-v3-1-6d62e3406b8d@debian.org>
On Mon 2026-11-09 05:44:30, Breno Leitao wrote:
> Commit 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep
> splats") made print_irqtrace_events() enter an nbcon emergency section
> by itself. That was meant for lockdep splats, but the function is also
> used outside lockdep (by verbose KCSAN reports, the soft and hard
> lockup detectors, etc).
>
> For KCSAN, as print_report() runs with the raw report_lock held and
> interrupts disabled, so every verbose report writes out the whole
> console backlog under report_lock. Other CPUs that detect a race in the
> meantime spin on report_lock with interrupts disabled, as the lock is
> taken before rate_limit_report() gets a chance to drop the report.
>
> That causes this type of problems (as seen in Meta's fleet):
>
> BUG: KCSAN: data-race in mlx5e_poll_tx_cq+0x5d8/0x998
> ...
> irq event stamp: 28975074
> smp: csd: Detected non-responsive CSD lock (#2) on CPU#35, waiting 5000000052 ns for CPU#26 ipi_mb+0x0/0x18(0x0).
> smp: csd: Detected non-responsive CSD lock (#3) on CPU#65, waiting 5000000020 ns for CPU#00 do_nothing+0x0/0x18(0x0).
> watchdog: CPU71: Watchdog detected hard LOCKUP on cpu 0
> Kernel panic - not syncing: Hard LOCKUP
>
> Drop the emergency section from print_irqtrace_events() and enter it
> around the call in check_flags(), the only lockdep splat that prints
> the irqtrace events outside of one. The other splats and __warn()
> already wrap their whole output in an emergency section.
>
> Fixes: 59cd94ef8009 ("lockdep: Mark emergency sections in lockdep splats")
> Suggested-by: John Ogness <john.ogness@linutronix.de>
> Signed-off-by: Breno Leitao <leitao@debian.org>
Looks good to me:
Reviewed-by: Petr Mladek <pmladek@suse.com>
I could take it via the printk tree. As the original commit
59cd94ef8009 ("lockdep: Mark emergency sections in lockdep splats")
went through printk tree.
Or Peter, Ingo, would you prefer to take it via the tip tree?
Best Regards,
Petr
prev parent reply other threads:[~2026-11-18 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 13:44 [PATCH v3] lockdep: Move the emergency section out of print_irqtrace_events() Breno Leitao
2026-11-09 14:06 ` John Ogness
2026-11-18 12:52 ` Petr Mladek [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=av2fmGFra8di7Ir3@pathway.suse.cz \
--to=pmladek@suse.com \
--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=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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