Re: [PATCH stable] memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock()

Michal Hocko
2024-02-21T10:48:12Z

On Wed 21-02-24 11:33:55, Greg KH wrote:
> On Wed, Feb 21, 2024 at 09:48:05AM +0100, Michal Hocko wrote:
> > On Wed 21-02-24 09:40:29, Greg KH wrote:
> > > On Wed, Feb 21, 2024 at 04:18:01PM +0800, GONG, Ruiqi wrote:
> > > > commit 1a3e1f40962c445b997151a542314f3c6097f8c3 upstream.
> > > >
> > > > There was a kernel panic happened on an in-house environment running
> > > > 3.10, and the same problem was reproduced on 4.19:
> > >
> > > Now queued up, thanks!
> >
> > Give it some more time Greg, http://lkml.kernel.org/r/ZdW2gMajIw_cUN2-@tiehlicka
>
> Oops, now dropped, thanks!

Race conditions. The thing got resolved in the mean time. The patch is a
partial backport, and I am OK with that. Now with my questions resolved
this is good to know but a note about this being a partial backport in
the changelog would be nice.

--
Michal Hocko
SUSE Labs