public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Edward Adam Davis <eadavis@qq.com>
Cc: cgroups@vger.kernel.org, chenridong@huaweicloud.com,
	hannes@cmpxchg.org, linux-kernel@vger.kernel.org,
	mkoutny@suse.com,
	syzbot+33e571025d88efd1312c@syzkaller.appspotmail.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH v2] sched/psi: fix race between file release and pressure write
Date: Sat, 11 Apr 2026 10:40:13 -1000	[thread overview]
Message-ID: <adqxrX8Huq1J4BLG@slm.duckdns.org> (raw)
In-Reply-To: <tencent_157925F8BA70BB65336B9E831B714BA11B08@qq.com>

Hello,

On Sat, Apr 11, 2026 at 04:29:22PM +0800, Edward Adam Davis wrote:
> On Fri, 10 Apr 2026 21:39:49 -1000, Tejun Heo wrote:
> > > > > +	ctx = of->priv;
> > > > > +	if (!ctx) {
> > > >
> > > > This test likely isn't necessary but that's pre-existing.
> > > Where?
> > > Are you referring to the check for of->released within:
> > 
> > No, I'm talking about of->priv. I don't think it can be NULL while a live
> > cgroup kn is locked, can it?
>
> If the lock is acquired before the execution of cgroup_file_release()
> completes, it will not be NULL; however, if acquired afterwards, it
> will invariably be NULL.

Hmmm? While the write is in flight the file can't be released and the cgroup
couldn't have been dead if lock_live succeeded. This part is tangential
anyway. Let's ignore for now.

Thanks.

-- 
tejun

  reply	other threads:[~2026-04-11 20:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 10:04 [syzbot] [cgroups?] KASAN: slab-use-after-free Read in pressure_write syzbot
2026-04-10  4:00 ` [PATCH] sched/psi: fix race between file release and pressure write Edward Adam Davis
2026-04-10  9:00   ` Chen Ridong
2026-04-10  9:45     ` Edward Adam Davis
2026-04-10 12:39       ` [PATCH v2] " Edward Adam Davis
2026-04-10 19:14         ` Tejun Heo
2026-04-11  4:25           ` Edward Adam Davis
2026-04-11  7:39             ` Tejun Heo
2026-04-11  8:29               ` Edward Adam Davis
2026-04-11 20:40                 ` Tejun Heo [this message]
2026-04-12  2:32                   ` Edward Adam Davis
2026-04-12  2:47                     ` [PATCH v3] " Edward Adam Davis
2026-04-13  1:51             ` [PATCH v2] " Chen Ridong
2026-04-13  2:11               ` Edward Adam Davis
2026-04-13  2:44                 ` [PATCH v4] " Edward Adam Davis
2026-04-14  2:29                   ` Chen Ridong
2026-04-14  4:08                     ` Edward Adam Davis
2026-04-14  6:15                       ` [PATCH v5] " Edward Adam Davis
2026-04-15  0:48                         ` Chen Ridong

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=adqxrX8Huq1J4BLG@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huaweicloud.com \
    --cc=eadavis@qq.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=syzbot+33e571025d88efd1312c@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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