mm: write-lock VMAs before removing them from VMA tree
authorSuren Baghdasaryan <surenb@google.com>
Mon, 27 Feb 2023 17:36:17 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 03:02:59 +0000 (20:02 -0700)
commit73046fd00b069ffd198eda099dae966e152fae39
tree91ca3bca6083ae6ba8762095e11c66072b345886
parentd6ac235de4ba6dc659eebb5f4e5ba0a8523d8424
mm: write-lock VMAs before removing them from VMA tree

Write-locking VMAs before isolating them ensures that page fault handlers
don't operate on isolated VMAs.

[surenb@google.com: mm/nommu: remove unnecessary VMA locking]
Link: https://lkml.kernel.org/r/20230301190457.1498985-1-surenb@google.com
Link: https://lore.kernel.org/all/Y%2F8CJQGNuMUTdLwP@localhost/
Link: https://lkml.kernel.org/r/20230227173632.3292573-19-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c