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=4764bb9e2e4481474719a5d58d9ff75fc8e001cb;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 8a0c4605e7f7d..589f1107ea5b1 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2102,13 +2102,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);