From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Lorenzo Stoakes (Oracle)" <ljs@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 14:38:18 +0100 [thread overview]
Message-ID: <a90233e7-8dd0-4c77-b048-d84b869a6a4f@kernel.org> (raw)
In-Reply-To: <d1ae6b20-ffe0-43f5-aa8a-9f6056b5ec51@lucifer.local>
On 3/18/26 14:03, Lorenzo Stoakes (Oracle) wrote:
> 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;
>
Exactly what I had in mind.
--
Cheers,
David
next prev parent reply other threads:[~2026-03-18 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:26 [PATCH mm-hotfixes] mm/rmap: clear vma->anon_vma on error Lorenzo Stoakes (Oracle)
2026-03-18 12:52 ` David Hildenbrand (Arm)
2026-03-18 13:03 ` Lorenzo Stoakes (Oracle)
2026-03-18 13:38 ` David Hildenbrand (Arm) [this message]
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=a90233e7-8dd0-4c77-b048-d84b869a6a4f@kernel.org \
--to=david@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.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=ljs@kernel.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