From: "Zqiang" <qiang.zhang@linux.dev>
To: "Sunho Park" <shpark061104@gmail.com>, 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: Wed, 26 Aug 2026 13:13:08 +0000 [thread overview]
Message-ID: <0e74e6799bf042293fd1e34e2f242c56786c3de4@linux.dev> (raw)
In-Reply-To: <24c0edd6-3cdc-4536-ac78-394bf785aad4@gmail.com>
>
> On 8/25/26 21:33, Zqiang wrote:
>
> >
> > If srcu_barrier() be invoke before srcu_cleanup(), and after srcu_barrier()
> > completion, there are no concurrent srcu grace period start again (e.g. call_srcu() calls),
> > the timer_delete_sync() should return false, the rcu_segcblist_n_cbs()
> > will not be check.
> > Or did I miss something?
> >
> In srcu_gp_end(), delayed work timer is always armed in SRCU_SIZE_SMALL mode regardless of whether its cblist has callbacks:
In this SRCU_SIZE_SMALL mode, when queue delayed work timer, the cblist is always no-empty.
unless invoke start_poll_synchronize_srcu() to begin SRCU garce period,
otherwise invoke call_srcu() or synchronize_srcu*() will insert callback.
Thanks
Zqiang
>
> if (ss_state < SRCU_SIZE_WAIT_BARRIER) {
> srcu_schedule_cbs_sdp(per_cpu_ptr(ssp->sda, get_boot_cpu_id()),
> cbdelay);
> } else {
> ...
> }
>
> and with cbdelay=1 (the non-expedited path) srcu_schedule_cbs_sdp() arms the per-CPU delay_work timer for the next jiffy. This includes the srcu_gp_end() whose grace period makes the barrier's callbacks ready, so an armed timer is left pending when srcu_invoke_callbacks() completes the barrier.
>
> Thanks
> Sunho Park
>
next prev parent reply other threads:[~2026-08-26 13:13 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 [this message]
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
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=0e74e6799bf042293fd1e34e2f242c56786c3de4@linux.dev \
--to=qiang.zhang@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=shpark061104@gmail.com \
--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®