From: Liam R. Howlett Date: Tue, 2 Feb 2021 14:17:16 +0000 (-0500) Subject: mm/mmap: Fix exit_mmap() maple state. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f49267da93bd8c57481b6c081526879ab8c758a8;p=users%2Fjedix%2Flinux-maple.git mm/mmap: Fix exit_mmap() maple state. Do not reset the maple state prior to unmap_vmas(). Signed-off-by: Liam R. Howlett --- 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);