From: Ming Lei <ming.lei@redhat.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: 李龙兴 <coregee2000@gmail.com>,
syzkaller@googlegroups.com, tj@kernel.org, josef@toxicpanda.com,
axboe@kernel.dk, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yukuai@fnnas.com
Subject: Re: [Kernel Bug] KASAN: slab-use-after-free Read in __blkcg_rstat_flush
Date: Tue, 3 Feb 2026 22:08:07 +0800 [thread overview]
Message-ID: <aYIBR6eeudRUQ9q8@fedora> (raw)
In-Reply-To: <l55sz3sgogoyniecolvzscjamxqrxlzgk7w7scds3tt42z6atj@nrfvjqg2agib>
On Tue, Feb 03, 2026 at 01:53:40PM +0100, Michal Koutný wrote:
> On Tue, Feb 03, 2026 at 07:11:11PM +0800, Ming Lei <ming.lei@redhat.com> wrote:
> > RCU supports this way, here is just 2-stage RCU chain, and everything
> > is deterministic.
>
> The time when RCU callback runs is noisy, moreover when chained after
> each other.
> (I don't mean it doesn't work but it's debugging/testing nuisance. And
> it also looks awkward.)
IMO it is one correct & simple fix for this complicated race.
>
> > I thought about this way, but ->lqueued is lockless, and in theory the `blkg_iostat_set`
> > can be added again after WRITE_ONCE(bisc->lqueued, false) happens, so this way looks
> > fragile.
>
> Right, I brushed up on the cycles from the commit 20cb1c2fb7568
> ("blk-cgroup: Flush stats before releasing blkcg_gq") and it'd be a step
> back.
>
> Does anything prevent doing the each-cpu flush in blkg_release() (before
> __blkg_release())?
I can't parse your question, here blkg_release() simply needs to flush
all stats. Why do you talk about preventing new flush? why is it related
with this UAF?
Thanks,
Ming
next prev parent reply other threads:[~2026-02-03 14:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 6:19 [Kernel Bug] KASAN: slab-use-after-free Read in __blkcg_rstat_flush 李龙兴
2026-02-03 3:03 ` Ming Lei
2026-02-03 10:54 ` Michal Koutný
2026-02-03 11:11 ` Ming Lei
2026-02-03 12:53 ` Michal Koutný
2026-02-03 14:08 ` Ming Lei [this message]
2026-02-03 14:16 ` Michal Koutný
2026-02-03 14:40 ` Ming Lei
2026-02-03 14:46 ` Jens Axboe
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=aYIBR6eeudRUQ9q8@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=coregee2000@gmail.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=syzkaller@googlegroups.com \
--cc=tj@kernel.org \
--cc=yukuai@fnnas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.