From b1ec5e2ac7dc72561d45aa49e1b8e5c41f20c66b Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Fri, 9 Oct 2020 15:12:59 -0400 Subject: [PATCH] maple_tree: Fix find_vma_intersction() cache update with possible incorrect addr Signed-off-by: Liam R. Howlett --- mm/mmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.50.1