]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Fix exit_mmap() maple state.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 2 Feb 2021 14:17:16 +0000 (09:17 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 2 Feb 2021 14:17:16 +0000 (09:17 -0500)
Do not reset the maple state prior to unmap_vmas().

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index 9a2336a2a410556f36e51b7a216b6920b3981c7c..ae7e2690ad6fdebfc80218cf60f1c1d9aa8e2487 100644 (file)
--- 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);