lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260114141204.d13c3a00aec1333e8ad45a8c@linux-foundation.org>
Date: Wed, 14 Jan 2026 14:12:04 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Suren Baghdasaryan <surenb@...gle.com>, "Liam R . Howlett"
 <Liam.Howlett@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, Shakeel Butt
 <shakeel.butt@...ux.dev>, David Hildenbrand <david@...nel.org>, Rik van
 Riel <riel@...riel.com>, Harry Yoo <harry.yoo@...cle.com>, Jann Horn
 <jannh@...gle.com>, Mike Rapoport <rppt@...nel.org>, Michal Hocko
 <mhocko@...e.com>, Pedro Falcato <pfalcato@...e.de>, Chris Li
 <chriscli@...gle.com>, Barry Song <v-songbaohua@...o.com>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/8] mm/rmap: remove unnecessary root lock dance in
 anon_vma clone, unmap

On Wed, 14 Jan 2026 17:54:07 +0000 Lorenzo Stoakes <lorenzo.stoakes@...cle.com> wrote:

> > >  {
> > > @@ -310,26 +284,28 @@ static void cleanup_partial_anon_vmas(struct vm_area_struct *vma);
> > >  int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
> > >  {
> > >         struct anon_vma_chain *avc, *pavc;
> > > -       struct anon_vma *root = NULL;
> > >
> > >         check_anon_vma_clone(dst, src);
> > >
> > >         if (!src->anon_vma)
> > >                 return 0;
> > >
> > > +       check_anon_vma_clone(dst, src);
> >
> > check_anon_vma_clone() was already called 4 lines above. I'm guessing
> > this was accidentally carried over from the previous version?
> >
> 
> Yeah I don't know why this is here, in the tree it isn't, maybe Andrew noticed
> and elided? :)

Thanks, but I wouldn't have done that silently.

The later "mm/rmap: separate out fork-only logic on anon_vma_clone()" removed it:

: @@ -281,17 +317,17 @@ static void cleanup_partial_anon_vmas(st
:   *
:   * Returns: 0 on success, -ENOMEM on failure.
:   */
: -int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
: +int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src,
: +		   enum vma_operation operation)
:  {
:  	struct anon_vma_chain *avc, *pavc;
: +	struct anon_vma *active_anon_vma = src->anon_vma;
:  
: -	check_anon_vma_clone(dst, src);
: +	check_anon_vma_clone(dst, src, operation);
:  
: -	if (!src->anon_vma)
: +	if (!active_anon_vma)
:  		return 0;
:  
: -	check_anon_vma_clone(dst, src);
: -
:  	/*
:  	 * Allocate AVCs. We don't need an anon_vma lock for this as we
:  	 * are not updating the anon_vma rbtree nor are we changing


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ