[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YOCW+pbXt5laJF8v@google.com>
Date: Sat, 3 Jul 2021 16:57:30 +0000
From: Dennis Zhou <dennis@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Tejun Heo <tj@...nel.org>, Christoph Lameter <cl@...ux.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] percpu: flush tlb after pcpu_depopulate_chunk()
On Sat, Jul 03, 2021 at 05:25:02AM +0000, Dennis Zhou wrote:
> On Fri, Jul 02, 2021 at 10:14:44PM -0700, Guenter Roeck wrote:
> > On Sat, Jul 03, 2021 at 04:04:49AM +0000, Dennis Zhou wrote:
> > > Prior to "percpu: implement partial chunk depopulation",
> > > pcpu_depopulate_chunk() was called only on the destruction path. This
> > > meant the virtual address range was on its way back to vmalloc which
> > > will handle flushing the tlbs for us.
> > >
> > > However, now that we call pcpu_depopulate_chunk() during the active
> > > lifecycle of a chunk, we need to flush the tlb as well otherwise we can
> > > end up accessing the wrong page through an invalid tlb mapping.
> > >
> > > This was reported in [1].
> > >
> > > [1] https://lore.kernel.org/lkml/20210702191140.GA3166599@roeck-us.net/
> > >
> > > Fixes: f183324133ea ("percpu: implement partial chunk depopulation")
> > > Reported-by: Guenter Roeck <linux@...ck-us.net>
> > > Signed-off-by: Dennis Zhou <dennis@...nel.org>
> >
> > Tested-by: Guenter Roeck <linux@...ck-us.net>
> >
> > Thanks!
> > Guenter
> >
>
> I updated the tag and have applied this to for-5.14-fixes so it can get
> some for-next exposure before I send a fix to Linus.
>
> Thanks for setting up the super easy repro! It made debugging this
> significantly easier.
>
I'm pulling this because I think I'll need to do some aggregation to
make this less expensive. I'll send some variant soon hopefully.
Thanks,
Dennis
Powered by blists - more mailing lists