From f49267da93bd8c57481b6c081526879ab8c758a8 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Tue, 2 Feb 2021 09:17:16 -0500 Subject: [PATCH] mm/mmap: Fix exit_mmap() maple state. Do not reset the maple state prior to unmap_vmas(). Signed-off-by: Liam R. Howlett --- mm/mmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 9a2336a2a410..ae7e2690ad6f 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3180,14 +3180,12 @@ void exit_mmap(struct mm_struct *mm) if (!vma) /* Can happen if dup_mmap() received an OOM */ return; - mas2 = mas; - mas_set(&mas, FIRST_USER_ADDRESS); - lru_add_drain(); flush_cache_mm(mm); tlb_gather_mmu(&tlb, mm, 0, -1); /* update_hiwater_rss(mm) here? but nobody should be looking */ /* Use 0 here to ensure all VMAs in the mm are unmapped */ + mas2 = mas; unmap_vmas(&tlb, vma, &mas, 0, -1); free_pgtables(&tlb, &mas2, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING); tlb_finish_mmu(&tlb, 0, -1); -- 2.50.1