From: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@surriel.com>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Harry Yoo <harry.yoo@oracle.com>, Jann Horn <jannh@google.com>,
Sasha Levin <sashal@kernel.org>,
Jiakai Xu <jiakaipeanut@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH mm-hotfixes] mm/rmap: clear vma->anon_vma on error
Date: Wed, 18 Mar 2026 13:03:27 +0000 [thread overview]
Message-ID: <d1ae6b20-ffe0-43f5-aa8a-9f6056b5ec51@lucifer.local> (raw)
In-Reply-To: <e71acbdc-f46e-4dac-a88d-5b297f518dd3@kernel.org>
On Wed, Mar 18, 2026 at 01:52:44PM +0100, David Hildenbrand (Arm) wrote:
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
>
Thanks!
> LGTM. I was wondering whether anon_vma_clone() should take care of
> setting up dst->anon_vma. It looks a bit odd in dup_anon_vma.
Well in the fork case we don't want to set vma->anon_vma, as we use
vma->anon_vma to denote whether or not we reused another anon_vma. For
split + remap, we already duplicated it via vm_area_dup() ->
vm_area_init_from().
But... now we have enum vma_operation threaded through here, we can just do
that there like:
/* dst is unfaulted, so inherit src's anon_vma. */
if (operation == VMA_OP_MERGE_UNFAULTED)
dst->anon_vma = src->anon_vma;
?
>
> --
> Cheers,
>
> David
Cheers, Lorenzo
next prev parent reply other threads:[~2026-03-18 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:26 Lorenzo Stoakes (Oracle)
2026-03-18 12:52 ` David Hildenbrand (Arm)
2026-03-18 13:03 ` Lorenzo Stoakes (Oracle) [this message]
2026-03-18 13:38 ` David Hildenbrand (Arm)
2026-03-18 14:15 ` Lorenzo Stoakes (Oracle)
2026-03-18 13:29 ` Vlastimil Babka
2026-03-19 1:12 ` Jiakai Xu
2026-03-19 5:26 ` Harry Yoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1ae6b20-ffe0-43f5-aa8a-9f6056b5ec51@lucifer.local \
--to=ljs@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=harry.yoo@oracle.com \
--cc=jannh@google.com \
--cc=jiakaipeanut@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@surriel.com \
--cc=sashal@kernel.org \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox