OSDN Git Service

mm: allow fault_dirty_shared_page() to be called under the VMA lock
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 12 Aug 2023 00:20:33 +0000 (01:20 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:38:02 +0000 (13:38 -0700)
commit0790e1e2b1b71ba357e89e779451efe79dff28e6
tree2d7f981cfd7cc31641e0e8f697acd62cb5b303ec
parent7e2fca52ef918e5c983391f984ed5c98b0dea6a1
mm: allow fault_dirty_shared_page() to be called under the VMA lock

By making maybe_unlock_mmap_for_io() handle the VMA lock correctly, we
make fault_dirty_shared_page() safe to be called without the mmap lock
held.

Link: https://lkml.kernel.org/r/20230812002033.1002367-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: David Hildenbrand <david@redhat.com>
Tested-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/internal.h