From: Liam R. Howlett Date: Tue, 2 Feb 2021 14:16:20 +0000 (-0500) Subject: mm/mmap: Fux do_mas_align_munmap() search for vma. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=60fc786b5bb50f77808f48f9cfd2891c86c566d4;p=users%2Fjedix%2Flinux-maple.git mm/mmap: Fux do_mas_align_munmap() search for vma. Use find instead of walk to search for the VMA to ensure a VMA is found if the start does not fall on a VMA Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index d4b199d0db5b..9a2336a2a410 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2418,7 +2418,7 @@ int do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma, } if (mas->node == MAS_START) - vma = mas_walk(mas); + vma = mas_find(mas, end - 1); if (unlikely(uf)) { /* @@ -2458,7 +2458,7 @@ int do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma, /* Unmap the region */ mas_set(&dst, start); tmp = dst; - vma = mas_walk(&dst); + vma = mas_find(&dst, end - 1); unmap_region(mm, vma, &dst, start, end, prev, max); /* Statistics and freeing VMAs */