From: Sunho Park <shpark061104@gmail.com>
To: Zqiang <qiang.zhang@linux.dev>, rcu@vger.kernel.org
Cc: paulmck@kernel.org, linux-kernel@vger.kernel.org,
syzbot+d4faf7db59e11f6fd1ab@syzkaller.appspotmail.com
Subject: Re: [BUG] srcu: false-positive WARN in cleanup_srcu_struct() after 78a38cbf6f20
Date: Thu, 27 Aug 2026 21:30:45 +0900 [thread overview]
Message-ID: <69bfdfd7-3efb-424a-9146-ca0ed9226edf@gmail.com> (raw)
In-Reply-To: <698a4d8b6c559f9049ee6fa6b0bc99d45a3d7e44@linux.dev>
On 8/27/26 20:35, Zqiang wrote:
>> Which tree is your test based on? (rcu tree or linux-next tree)
I'm testing on the linux-next tree(next-20260821), regarding the commit
[1].
> The step5 srcu_barrier() has been intercept the srcu callback which by step4 call_srcu() insert,
> so at here, the srcu_barrier should not be return, and the step4 srcu callback should not be run.
> the cleanup_srcu_struct() also should not be called.
srcu_barrier() didn't return at that point, it returned at step 9 when
srcu_invoke_callbacks() (which was queued to rcu_gp_wq at step 3) calls
the barrier cb after finishing the real five __free_bus callbacks. Steps
3 through 9 all happen within the same jiffy, so the timer armed at step
6 for the next jiffy is still pending at step 9. Also, a stale n_cbs is
left because, although srcu_invoke_callbacks()'s invoking loop may have
finished at that point, the control flow has not yet reached the
rcu_segcblist_add_len(-len) call at the end of srcu_invoke_callbacks().
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/kernel/rcu/srcutree.c?id=78a38cbf6f20bc8247e93d1149f97c12dba9fbfb
Thanks
Sunho Park
next prev parent reply other threads:[~2026-08-27 12:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 10:56 Sunho Park
2026-08-25 12:33 ` Zqiang
2026-08-25 16:50 ` Sunho Park
2026-08-26 13:13 ` Zqiang
2026-08-26 16:03 ` Sunho Park
2026-08-26 23:53 ` Zqiang
2026-08-27 9:11 ` Sunho Park
2026-08-27 11:13 ` Zqiang
2026-08-27 11:35 ` Zqiang
2026-08-27 12:30 ` Sunho Park [this message]
2026-08-27 12:40 ` Zqiang
2026-08-27 13:03 ` Sunho Park
2026-08-27 13:40 ` Zqiang
2026-08-27 13:41 ` Zqiang
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=69bfdfd7-3efb-424a-9146-ca0ed9226edf@gmail.com \
--to=shpark061104@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang@linux.dev \
--cc=rcu@vger.kernel.org \
--cc=syzbot+d4faf7db59e11f6fd1ab@syzkaller.appspotmail.com \
/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®