All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-hotfixes-stable] userfaultfd-fix-deadlock-warning-when-locking-src-and-dst-vmas.patch removed from -mm tree
@ 2024-03-26 18:08 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-03-26 18:08 UTC (permalink / raw)
  To: mm-commits, surenb, rppt, peterx, ngeoffray, kaleshsingh, jannh,
	hdanton, david, bgeffon, axelrasmussen, aarcange, lokeshgidra,
	akpm


The quilt patch titled
     Subject: userfaultfd: fix deadlock warning when locking src and dst VMAs
has been removed from the -mm tree.  Its filename was
     userfaultfd-fix-deadlock-warning-when-locking-src-and-dst-vmas.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Lokesh Gidra <lokeshgidra@google.com>
Subject: userfaultfd: fix deadlock warning when locking src and dst VMAs
Date: Thu, 21 Mar 2024 16:58:18 -0700

Use down_read_nested() to avoid the warning.

Link: https://lkml.kernel.org/r/20240321235818.125118-1-lokeshgidra@google.com
Fixes: 867a43a34ff8 ("userfaultfd: use per-vma locks in userfaultfd operations")
Reported-by: syzbot+49056626fe41e01f2ba7@syzkaller.appspotmail.com
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Jann Horn <jannh@google.com> [Bug #2]
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Nicolas Geoffray <ngeoffray@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/userfaultfd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/userfaultfd.c~userfaultfd-fix-deadlock-warning-when-locking-src-and-dst-vmas
+++ a/mm/userfaultfd.c
@@ -1444,7 +1444,8 @@ static int uffd_move_lock(struct mm_stru
 		 */
 		down_read(&(*dst_vmap)->vm_lock->lock);
 		if (*dst_vmap != *src_vmap)
-			down_read(&(*src_vmap)->vm_lock->lock);
+			down_read_nested(&(*src_vmap)->vm_lock->lock,
+					 SINGLE_DEPTH_NESTING);
 	}
 	mmap_read_unlock(mm);
 	return err;
_

Patches currently in -mm which might be from lokeshgidra@google.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-26 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 18:08 [merged mm-hotfixes-stable] userfaultfd-fix-deadlock-warning-when-locking-src-and-dst-vmas.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.