Re: [PATCH v2] sched/psi: fix race between file release and pressure write

From: Edward Adam Davis

Date: Sat Apr 11 2026 - 04:31:38 EST


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.

Edward
BR