[PATCH v5 12/15] mm/hugetlbfs: update hugetlbfs to use mmap_prepare

Sumanth Korikkar sumanthk at linux.ibm.com
Mon Oct 20 06:39:37 PDT 2025


On Mon, Oct 20, 2025 at 01:11:29PM +0100, Lorenzo Stoakes wrote:
> Since we can now perform actions after the VMA is established via
> mmap_prepare, use desc->action_success_hook to set up the hugetlb lock
> once the VMA is setup.
> 
> We also make changes throughout hugetlbfs to make this possible.
> 
> Note that we must hide newly established hugetlb VMAs from the rmap until
> the operation is entirely complete as we establish a hugetlb lock during
> VMA setup that can be raced by rmap users.
> 
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Hi Lorenzo,

Tested this patch with libhugetlbfs tests. No locking issues anymore.

Tested-by: Sumanth Korikkar <sumanthk at linux.ibm.com>

Thank you



More information about the kexec mailing list