Re: [PATCH] mm/rmap: synchronize lock and unlock target in anon_vma_clone

Barry Song <[email protected]>
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel
Message-ID <CAGsJ_4wNPeSYHe_-UZnNRF1i1yWOxdbOiqsuVXVtLU7BDOBbJg@mail.gmail.com>
On Fri, Aug 14, 2026 at 2:33 PM Eric Kim <[email protected]> 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 <[email protected]>

Best Regards
Barry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.