Skip to contentSkip to conversation

kernel-fork-assert-no-vma-readers-during-its-destruction.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Apr 6, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kernel/fork: assert no VMA readers during its destruction
has been removed from the -mm tree. Its filename was
kernel-fork-assert-no-vma-readers-during-its-destruction.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 <[email protected]>
Subject: kernel/fork: assert no VMA readers during its destruction
Date: Mon, 27 Feb 2023 09:36:19 -0800

Assert there are no holders of VMA lock for reading when it is about to be destroyed.

---

 kernel/fork.c |    3 +++
 1 file changed, 3 insertions(+)
kernel/fork.c renamed from kernel/fork.c~kernel-fork-assert-no-vma-readers-during-its-destruction +3 -0
@@ -491,6 +491,9 @@ static void vm_area_free_rcu_cb(struct r
 {
 	struct vm_area_struct *vma = container_of(head, struct vm_area_struct,
 						  vm_rcu);
+
+	/* The vma should not be locked while being destroyed. */
+	VM_BUG_ON_VMA(rwsem_is_locked(&vma->lock), vma);
 	__vm_area_free(vma);
 }
 #endif

_

Patches currently in -mm which might be from [email protected] are