diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-04-16 12:31:58 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-04-16 12:31:58 -0700 |
commit | e492cd61b986590a45c674ede7dd1c4dbf94cf24 (patch) | |
tree | 37dc59ea66842b5b7e57f32aba6cbce5143c1282 /mm/mmap.c | |
parent | d46031f40e0f7f7bf63914bb3f2e404ad3886ecd (diff) | |
parent | 2ff559f31a5d50c31a3f9d849f8af90dc36c7105 (diff) |
sync mm-stable with mm-hotfixes-stable to pick up depended-upon upstream changes
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 511f656eb423..51cd747884e3 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2309,7 +2309,7 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, int count = 0; int error = -ENOMEM; MA_STATE(mas_detach, &mt_detach, 0, 0); - mt_init_flags(&mt_detach, MT_FLAGS_LOCK_EXTERN); + mt_init_flags(&mt_detach, vmi->mas.tree->ma_flags & MT_FLAGS_LOCK_MASK); mt_set_external_lock(&mt_detach, &mm->mmap_lock); /* @@ -3069,6 +3069,7 @@ void exit_mmap(struct mm_struct *mm) */ set_bit(MMF_OOM_SKIP, &mm->flags); mmap_write_lock(mm); + mt_clear_in_rcu(&mm->mm_mt); free_pgtables(&tlb, &mm->mm_mt, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING, true); tlb_finish_mmu(&tlb); |