tools/testing/vma: add missing function stub
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Wed, 28 May 2025 14:15:39 +0000 (15:15 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 1 Jun 2025 05:46:14 +0000 (22:46 -0700)
The hugetlb fix introduced in commit ee40c9920ac2 ("mm: fix copy_vma()
error handling for hugetlb mappings") mistakenly did not provide a stub
for the VMA userland testing, which results in a compile error when trying
to build this.

Provide this stub to resolve the issue.

Link: https://lkml.kernel.org/r/20250528-fix-vma-test-v1-1-c8a5f533b38f@oracle.com
Fixes: ee40c9920ac2 ("mm: fix copy_vma() error handling for hugetlb mappings")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Cc: Jann Horn <jannh@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/vma/vma_internal.h

index f6e45e6..441feb2 100644 (file)
@@ -1461,4 +1461,9 @@ static inline int __call_mmap_prepare(struct file *file,
        return file->f_op->mmap_prepare(desc);
 }
 
+static inline void fixup_hugetlb_reservations(struct vm_area_struct *vma)
+{
+       (void)vma;
+}
+
 #endif /* __MM_VMA_INTERNAL_H */