All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-userfaultfd-remove-stale-comment-about-core-dump-locking.patch removed from -mm tree
@ 2023-08-24 23:21 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-24 23:21 UTC (permalink / raw)
  To: mm-commits, jannh, akpm


The quilt patch titled
     Subject: mm: userfaultfd: remove stale comment about core dump locking
has been removed from the -mm tree.  Its filename was
     mm-userfaultfd-remove-stale-comment-about-core-dump-locking.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: Jann Horn <jannh@google.com>
Subject: mm: userfaultfd: remove stale comment about core dump locking
Date: Tue, 15 Aug 2023 23:22:16 +0200

Since commit 7f3bfab52cab ("mm/gup: take mmap_lock in get_dump_page()"),
which landed in v5.10, core dumping doesn't enter fault handling without
holding the mmap_lock anymore.  Remove the stale parts of the comments,
but leave the behavior as-is - letting core dumping block on userfault
handling would be a bad idea and could lead to deadlocks if the dumping
process was handling its own userfaults.

Link: https://lkml.kernel.org/r/20230815212216.264445-1-jannh@google.com
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/userfaultfd.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/fs/userfaultfd.c~mm-userfaultfd-remove-stale-comment-about-core-dump-locking
+++ a/fs/userfaultfd.c
@@ -428,15 +428,11 @@ vm_fault_t handle_userfault(struct vm_fa
 	 * FOLL_DUMP case, anon memory also checks for FOLL_DUMP with
 	 * the no_page_table() helper in follow_page_mask(), but the
 	 * shmem_vm_ops->fault method is invoked even during
-	 * coredumping without mmap_lock and it ends up here.
+	 * coredumping and it ends up here.
 	 */
 	if (current->flags & (PF_EXITING|PF_DUMPCORE))
 		goto out;
 
-	/*
-	 * Coredumping runs without mmap_lock so we can only check that
-	 * the mmap_lock is held, if PF_DUMPCORE was not set.
-	 */
 	assert_fault_locked(vmf);
 
 	ctx = vma->vm_userfaultfd_ctx.ctx;
_

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



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

only message in thread, other threads:[~2023-08-24 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 23:21 [merged mm-stable] mm-userfaultfd-remove-stale-comment-about-core-dump-locking.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.