* + mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone.patch added to mm-unstable branch
@ 2026-08-14 18:29 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-14 18:29 UTC (permalink / raw)
To: mm-commits, vbabka, riel, ljs, liam, lance.yang, jannh, harry,
david, seohyun.kim, akpm
The patch titled
Subject: mm/rmap: synchronize lock and unlock target in anon_vma_clone
has been added to the -mm mm-unstable branch. Its filename is
mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Eric Kim <seohyun.kim@outlook.kr>
Subject: mm/rmap: synchronize lock and unlock target in anon_vma_clone
Date: Fri, 14 Aug 2026 15:30:51 +0900
Currently, in anon_vma_clone(), src vma's anon_vma is assigned to
active_anon_vma and is used when unlocking anon_vma after linking new
AVCs. However, the anon_vma is locked using src->anon_vma, instead of
active_anon_vma, making the lock and unlock target inconsistent.
Use active_anon_vma for both locking and unlocking.
Link: https://lore.kernel.org/OS7PR01MB139142FE16EC63B892559D40496DA2@OS7PR01MB13914.jpnprd01.prod.outlook.com
Signed-off-by: Eric Kim <seohyun.kim@outlook.kr>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Harry Yoo <harry@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/rmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/rmap.c~mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone
+++ a/mm/rmap.c
@@ -350,7 +350,7 @@ int anon_vma_clone(struct vm_area_struct
* Now link the anon_vma's back to the newly inserted AVCs.
* Note that all anon_vma's share the same root.
*/
- anon_vma_lock_write(src->anon_vma);
+ anon_vma_lock_write(active_anon_vma);
list_for_each_entry_reverse(avc, &dst->anon_vma_chain, same_vma) {
struct anon_vma *anon_vma = avc->anon_vma;
_
Patches currently in -mm which might be from seohyun.kim@outlook.kr are
mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-14 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 18:29 + mm-rmap-synchronize-lock-and-unlock-target-in-anon_vma_clone.patch added to mm-unstable branch 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.