]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: conditionally write-lock VMA in free_pgtables
authorSuren Baghdasaryan <surenb@google.com>
Mon, 27 Feb 2023 17:36:18 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:09 +0000 (16:02 -0700)
commit3d5392af80aebb2afc43e78c4e61f364ade0d304
treebc1f4e61454c086a8a8412b9be00f8b971d41108
parentd668459cfdb598f97cda043359ca2fa94100bcad
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 for such scenario.

Link: https://lkml.kernel.org/r/20230227173632.3292573-20-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/internal.h
mm/memory.c
mm/mmap.c