Re: [PATCH] mm/rmap: synchronize lock and unlock target in anon_vma_clone
From: Barry Song
Date: Sat Aug 15 2026 - 01:22:05 EST
On Fri, Aug 14, 2026 at 2:33 PM Eric Kim <seohyun.kim@xxxxxxxxxx> wrote:
>
> 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.
I'm not a native speaker, but I feel the lock and unlock are actually
consistent and operate on the same anon_vma. The code just looks
unpaired: one uses src->anon_vma, while the other uses
active_anon_vma. But aren't they actually the same thing?
Not an objection to the patch; I just find the changelog a bit
confusing.
>
> Use active_anon_vma for both locking and unlocking.
>
> Signed-off-by: Eric Kim <seohyun.kim@xxxxxxxxxx>
Best Regards
Barry