From: Liam R. Howlett Date: Wed, 20 Apr 2022 13:37:50 +0000 (-0400) Subject: mm: Fix commit "mm: start tracking VMAs with maple tree" X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fmglru-mapletree;p=users%2Fjedix%2Flinux-maple.git mm: Fix commit "mm: start tracking VMAs with maple tree" Hold the lock for the destruction of the maple tree to avoid lockdep issues - and potentially process_mrelease. Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index f172f3aba90f..dbfd3576b6d0 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3163,9 +3163,9 @@ void exit_mmap(struct mm_struct *mm) BUG_ON(count != mm->map_count); - mmap_write_unlock(mm); trace_exit_mmap(mm); __mt_destroy(&mm->mm_mt); + mmap_write_unlock(mm); vm_unacct_memory(nr_accounted); }