mm-switch-the-rmap-lock-held-option-off-in-compat-layer.patch removed from -mm tree
The quilt patch titled
Subject: mm: switch the rmap lock held option off in compat layer
has been removed from the -mm tree. Its filename was
mm-switch-the-rmap-lock-held-option-off-in-compat-layer.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: "Lorenzo Stoakes (Oracle)" <[email protected]>
Subject: mm: switch the rmap lock held option off in compat layer
Date: Fri, 20 Mar 2026 22:39:31 +0000
In the mmap_prepare compatibility layer, we don't need to hold the rmap lock, as we are being called from an .mmap handler.
The .mmap_prepare hook, when invoked in the VMA logic, is called prior to the VMA being instantiated, but the completion hook is called after the VMA is linked into the maple tree, meaning rmap walkers can reach it.
The mmap hook does not link the VMA into the tree, so this cannot happen.
Therefore it's safe to simply disable this in the mmap_prepare compatibility layer.
Also update VMA tests code to reflect current compatibility layer state.
---
mm/util.c | 6 +++- tools/testing/vma/include/dup.h | 42 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 21 deletions(-)
mm/util.c renamed from mm/util.c~mm-switch-the-rmap-lock-held-option-off-in-compat-layer +5 -1
@@ -1204,6 +1204,7 @@ int compat_vma_mmap(struct file *file, s .action.type = MMAP_NOTHING, /* Default */ }; +struct mmap_action *action = &desc.action;int err; err =vfs_mmap_prepare (file, &desc);
@@ -1214,8 +1215,11 @@ int compat_vma_mmap(struct file *file, sif (err)return err; +/* being invoked from .mmap means we don't have to enforce this. */ + action->hide_from_rmap_until_complete = false; +set_vma_from_desc (vma, &desc); - err =mmap_action_complete (vma, &desc.action); + err =mmap_action_complete (vma, action);if (err) {const size_t len =vma_pages (vma) <<PAGE_SHIFT ;
tools/testing/vma/include/dup.h renamed from tools/testing/vma/include/dup.h~mm-switch-the-rmap-lock-held-option-off-in-compat-layer +22 -20
78 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
maintainers-update-mglru-entry-to-reflect-current-status.patch selftests-mm-add-merge-test-for-partial-msealed-range.patch