* [merged mm-stable] mm-prevent-do_swap_page-from-handling-page-faults-under-vma-lock.patch removed from -mm tree
@ 2023-04-06 3:03 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-04-06 3:03 UTC (permalink / raw)
To: mm-commits, laurent.dufour, surenb, akpm
The quilt patch titled
Subject: mm: prevent do_swap_page from handling page faults under VMA lock
has been removed from the -mm tree. Its filename was
mm-prevent-do_swap_page-from-handling-page-faults-under-vma-lock.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Suren Baghdasaryan <surenb@google.com>
Subject: mm: prevent do_swap_page from handling page faults under VMA lock
Date: Mon, 27 Feb 2023 09:36:25 -0800
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 | 5 +++++
1 file changed, 5 insertions(+)
--- a/mm/memory.c~mm-prevent-do_swap_page-from-handling-page-faults-under-vma-lock
+++ a/mm/memory.c
@@ -3697,6 +3697,11 @@ vm_fault_t do_swap_page(struct vm_fault
if (!pte_unmap_same(vmf))
goto out;
+ if (vmf->flags & FAULT_FLAG_VMA_LOCK) {
+ ret = VM_FAULT_RETRY;
+ goto out;
+ }
+
entry = pte_to_swp_entry(vmf->orig_pte);
if (unlikely(non_swap_entry(entry))) {
if (is_migration_entry(entry)) {
_
Patches currently in -mm which might be from surenb@google.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-06 3:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 3:03 [merged mm-stable] mm-prevent-do_swap_page-from-handling-page-faults-under-vma-lock.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.