Re: [PATCH 0/2] userfaultfd: merge fs/userfaultfd.c into mm/userfaultfd.c
From: Mike Rapoport
Date: Fri May 01 2026 - 10:57:21 EST
On Thu, Apr 30, 2026 at 09:01:10AM -0700, Andrew Morton wrote:
> On Thu, 30 Apr 2026 14:35:10 +0300 Mike Rapoport <rppt@xxxxxxxxxx> wrote:
>
> > These patches merge fs/userfaultfd.c into mm/userfaultfd.c and make
> > functions used only inside mm/userfaultfd.c static.
>
> It's kinda scary how often Sashiko finds existing issues just because
> we made it look.
>
> https://sashiko.dev/#/patchset/20260430113512.115938-1-rppt@xxxxxxxxxx
>
> Do either of these look legit? If so, it would be better to fix them
> before doing the code movement, for backporting ease.
One is real, another one is not.
> Another issue in the moved code: the ctx variable is annotated with
> __free(kfree) but allocated using kmem_cache_alloc() from the custom
> userfaultfd_ctx_cachep cache.
@Roman, can you please explain to sashiko that kfree() is fine with
kmem_cache_alloc()?
--
Sincerely yours,
Mike.