Re: [PATCH 2/2] mm: zswap: remove unnecessary tree cleanups in zswap_swapoff()
From: Chris Li
Date: Thu Jan 25 2024 - 20:10:01 EST
Hi Yosry,
On Thu, Jan 25, 2024 at 2:34 PM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote:
>
> > > problem is that after the entry is isolated from the zswap LRU, we
> > > need to grab the tree lock to make sure it's still there and get a
> > > ref, and just trying to lock the tree may be a UAF if we race with
> > > swapoff.
> >
> > I feel it is very wrong to have the tree freed while having
> > outstanding entry allocationed from the tree pending.
> > I would want to avoid that situation if possible.
>
> This should be the case with Chengming's solution.
Thanks for confirming. Looking forward to Chenming's patch.
Chris