mm: prevent do_swap_page from handling page faults under VMA lock
authorSuren Baghdasaryan <surenb@google.com>
Mon, 27 Feb 2023 17:36:25 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 03:03:00 +0000 (20:03 -0700)
commit17c05f18e54158a3eed0c22c85b7a756b63dcc01
tree4170c5e1845643bec3a734af3b8f4283a9e8d6d4
parent55324e46eb8b886ecd08c9a089d3a694c705b3b0
mm: prevent do_swap_page from handling page faults under VMA lock

Due to the possibility of do_swap_page dropping mmap_lock, abort fault
handling under VMA lock and retry holding mmap_lock.  This can be handled
more gracefully in the future.

Link: https://lkml.kernel.org/r/20230227173632.3292573-27-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Laurent Dufour <laurent.dufour@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory.c