Re: [PATCH v4 0/3] mm/khugepaged: fix khugepaged+shmem races

From: Yang Shi
Date: Fri Mar 03 2023 - 13:55:31 EST


On Fri, Mar 3, 2023 at 7:35 AM Peter Xu <peterx@xxxxxxxxxx> wrote:
>
> On Fri, Feb 17, 2023 at 05:54:36PM +0900, David Stevens wrote:
> > From: David Stevens <stevensd@xxxxxxxxxxxx>
> >
> > Fix two races in khugepaged+shmem that cause issues with userfaultfd and
> > lseek, respectively.
> >
> > v3 -> v4:
> > - Base changes on mm-everything (fba720cb4dc0)
> > - Add patch to refactor error handling control flow in collapse_file
> > - Rebase userfaultfd patch with no significant logic changes
> > - Different approach for fixing lseek race
>
> I just noticed this one hasn't landed unstable, so I guess I just posted a
> trivial cleanup that can conflict with this so it won't apply cleanly..
>
> https://lore.kernel.org/r/20230303151218.311015-1-peterx@xxxxxxxxxx
>
> The resolution will be fairly straightforward though, and I'm happy to
> rebase that one to this since this targets a real bug so should have higher
> priority.
>
> I guess it's possible Andrew thought the series has unsettled comment so
> Andrew could just have ignored that whole set in the mark ups. A repost
> could possibly clarify that.

IIUC this series should need to be rebased on top of your clean up patch?

>
> Again, it'll always great to get another eye on this slightly involved
> series. Matthew / Yang were already on the list, also copying Zach for his
> recent works on khugepaged just in case he spots anything wrong.

I had a quick look at it before, I didn't recall I spotted anything
wrong about khugepaged, but I'm not familiar with userfaultfd.

>
> Thanks,
>
> --
> Peter Xu
>