[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYIBR6eeudRUQ9q8@fedora>
Date: Tue, 3 Feb 2026 22:08:07 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: 李龙兴 <coregee2000@...il.com>,
syzkaller@...glegroups.com, tj@...nel.org, josef@...icpanda.com,
axboe@...nel.dk, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yukuai@...as.com
Subject: Re: [Kernel Bug] KASAN: slab-use-after-free Read in
__blkcg_rstat_flush
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@...hat.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
Powered by blists - more mailing lists