]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: conditionally write-lock VMA in free_pgtables
authorSuren Baghdasaryan <surenb@google.com>
Sat, 11 Jun 2022 05:09:08 +0000 (22:09 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 4 Jan 2023 20:59:26 +0000 (15:59 -0500)
commit1b101c62da229ee82ee723e403648c8d121fa867
treeae54940cae2feb5480ff976f195f767e427ab169
parentca70de3ec4af4a8f99331d03349e56c9b4c18193
mm: conditionally write-lock VMA in free_pgtables

Normally free_pgtables needs to lock affected VMAs except for the case
when VMAs were isolated under VMA write-lock. munmap() does just that,
isolating while holding appropriate locks and then downgrading mmap_lock
and dropping per-VMA locks before freeing page tables.
Add a parameter to free_pgtables and unmap_region for such scenario.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
mm/internal.h
mm/memory.c
mm/mmap.c