From: Liam R. Howlett Date: Fri, 9 Oct 2020 19:12:59 +0000 (-0400) Subject: maple_tree: Fix find_vma_intersction() cache update with possible incorrect addr X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b1ec5e2ac7dc72561d45aa49e1b8e5c41f20c66b;p=users%2Fjedix%2Flinux-maple.git maple_tree: Fix find_vma_intersction() cache update with possible incorrect addr Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index 1bfdf6492be7..ba93cf9e3816 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2110,13 +2110,14 @@ struct vm_area_struct *find_vma_intersection(struct mm_struct *mm, unsigned long end_addr) { struct vm_area_struct *vma; + unsigned long addr = start_addr; /* Check the cache first. */ vma = vmacache_find(mm, start_addr); if (likely(vma)) return vma; - vma = mt_find(&mm->mm_mt, &start_addr, end_addr - 1); + vma = mt_find(&mm->mm_mt, &addr, end_addr - 1); if (vma) vmacache_update(start_addr, vma);