mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zqiang" <qiang.zhang@linux.dev>
To: "Sunho Park" <shpark061104@gmail.com>, paulmck@kernel.org
Cc: linux-kernel@vger.kernel.org,
	syzbot+d4faf7db59e11f6fd1ab@syzkaller.appspotmail.com,
	rcu@vger.kernel.org
Subject: Re: [BUG] srcu: false-positive WARN in cleanup_srcu_struct() after 78a38cbf6f20
Date: Thu, 27 Aug 2026 13:41:54 +0000	[thread overview]
Message-ID: <b3964e625bd41303b4b40357d4b30aa23a536098@linux.dev> (raw)
In-Reply-To: <28ac9afd-92dc-4c92-91f3-94f025977ca7@gmail.com>

> 
> On 8/27/26 21:40, Zqiang wrote:
> 
> > 
> > Now, I am trying to rephrase your problem in the following way:
> >  1- the step1 call_srcu() trigger SRCU grace period has been end and queue sdp->work.
> >  2- the step4 queue srcu callback has been intercepted by step5 srcu_barrier()
> >  and start a new SRCU grace period.
> >  3- this new SRCU grace period end, and invoke rcu_seq_end(&sup->srcu_gp_seq), queue a timer.
> >  4- the sdp->work begin run, and call srcu_segcblist_advance() with current sup->srcu_gp_seq.
> >  so the step4's srcu callback and step5's barrier calback both to be run.
> >  all callback finished, but the len not yet update.
> >  5- the srcu_barrier() return, begin call srcu_clean_up(), and then the srcu_clean_up
> >  find the a timer is still pending and the cb_len also not be zero, trigger WARN_ON()
> >  right?
> > 
> Exactly. The real callbacks are properly invoked as srcu_barrier() guarantees. The WARN is triggered only by the two transient states: a pending delay_work timer and a stale cblist len. So I think this is a false positive warning.
> 
> Sorry if my explanations were too wordy.

Would you like to send a patch to fix it ?

remove WARN_ON() or use rcu_segcblist_empty(&sdp->srcu_cblist) to replace rcu_segcblist_n_cbs(&sdp->srcu_cblist) ?

Let's hear Paul's opinion.

Thanks
Zqiang

> 
> Thanks
> Sunho Park
>

      parent reply	other threads:[~2026-08-27 13:41 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
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 [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=b3964e625bd41303b4b40357d4b30aa23a536098@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®