Re: [PATCH v4 04/15] userfaultfd: introduce mfill_get_vma() and mfill_put_vma()

Harry Yoo (Oracle)
2026-04-03T12:54:18Z

On Thu, Apr 02, 2026 at 07:11:45AM +0300, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
>
> Split the code that finds, locks and verifies VMA from mfill_atomic() into
> a helper function.
>
> This function will be used later during refactoring of
> mfill_atomic_pte_copy().
>
> Add a counterpart mfill_put_vma() helper that unlocks the VMA and releases
> map_changing_lock.
>
> [avagin@google.com: fix lock leak in mfill_get_vma()]
> Link: https://lkml.kernel.org/r/20260316173829.1126728-1-avagin@google.com
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> Signed-off-by: Andrei Vagin <avagin@google.com>
> ---

Looks good to me,
Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org>

--
Cheers,
Harry / Hyeonggon