From: Boqun Feng <boqun@kernel.org>
To: Kunwu Chan <kunwu.chan@gmail.com>
Cc: jiangshanlai@gmail.com, paulmck@kernel.org,
josh@joshtriplett.org, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] srcu: Add lockdep coverage for atomic SRCU and fix IRQ-state bug
Date: Mon, 21 Sep 2026 22:27:29 +0200 [thread overview]
Message-ID: <arGTMdkrE3oMcBq3@MacBook-0RXW5> (raw)
In-Reply-To: <20260914093419.1474829-1-kunwu.chan@gmail.com>
On Mon, Sep 14, 2026 at 05:34:14PM +0800, Kunwu Chan wrote:
> The atomic SRCU fastpath enables synchronize_srcu_atomic() to be called
> from contexts with interrupts disabled. This series extends the
> rcutorture lockdep tests to cover the atomic SRCU path and fixes an
> IRQ-state preservation bug discovered along the way.
>
> Patch 1-2 add lockdep test coverage for atomic SRCU:
> - testtype 4: same-type atomic SRCU deadlock
> - testtype 5: atomic SRCU + raw spinlock dependency cycle
> - testtype 6: rcu_read_lock() -> synchronize_srcu_atomic()
> legitimate nesting, must not trigger lockdep warning
>
> Patch 3 fixes a bug where the synchronize_srcu_atomic() call chain
> unconditionally re-enables interrupts on unlock, by switching to the
> irqsave/irqrestore variants throughout the call chain.
>
> Patch 4 fixes a pre-existing double nerrs count in the script.
>
> Patch 5 adds testtype 7: cross-CPU IRQ context mismatch detection,
> where an atomic SRCU reader held with IRQs enabled on one CPU is
> paired with synchronize_srcu_atomic() via IPI on another CPU.
>
Acked-by: Boqun Feng <boqun@kernel.org>
Regards,
Boqun
> Kunwu Chan (5):
> rcutorture: Add atomic SRCU lockdep support
> selftests/rcutorture: Wire atomic SRCU into srcu_lockdep.sh
> srcutree: Preserve IRQ state in synchronize_srcu_atomic() callchain
> selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh
> rcutorture: Add atomic SRCU cross-CPU IRQ context mismatch test
>
> kernel/rcu/rcutorture.c | 109 +++++++++++++++++-
> kernel/rcu/srcutree.c | 42 ++++---
> .../selftests/rcutorture/bin/srcu_lockdep.sh | 77 ++++++++++++-
> 3 files changed, 205 insertions(+), 23 deletions(-)
>
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-09-21 20:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 9:34 Kunwu Chan
2026-09-14 9:34 ` [PATCH 1/5] rcutorture: Add atomic SRCU lockdep support Kunwu Chan
2026-09-14 9:34 ` [PATCH 2/5] selftests/rcutorture: Wire atomic SRCU into srcu_lockdep.sh Kunwu Chan
2026-09-14 9:34 ` [PATCH 3/5] srcutree: Preserve IRQ state in synchronize_srcu_atomic() callchain Kunwu Chan
2026-09-14 9:34 ` [PATCH 4/5] selftests/rcutorture: Fix double nerrs count in srcu_lockdep.sh Kunwu Chan
2026-09-14 9:34 ` [PATCH 5/5] rcutorture: Add atomic SRCU cross-CPU IRQ context mismatch test Kunwu Chan
2026-09-21 20:27 ` Boqun Feng [this message]
2026-09-21 21:14 ` [PATCH 0/5] srcu: Add lockdep coverage for atomic SRCU and fix IRQ-state bug Paul E. McKenney
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=arGTMdkrE3oMcBq3@MacBook-0RXW5 \
--to=boqun@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kunwu.chan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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®