From: Vlastimil Babka <vbabka@suse.cz>
To: David Hildenbrand <david@redhat.com>, linux-mm@kvack.org
Cc: Peter Xu <peterx@redhat.com>
Subject: Re: [RFC for stable 5.15 and 5.10] mm/memory: only copy anonymous pages during fork()
Date: Wed, 13 Nov 2024 17:18:16 +0100 [thread overview]
Message-ID: <f1edffb8-921f-4d11-b691-9f7100a32c90@suse.cz> (raw)
In-Reply-To: <5c881108-41d8-4e8c-a1ec-9c04bc68a008@redhat.com>
On 11/13/24 17:09, David Hildenbrand wrote:
>> ---
>> Hi, we've seen this in our 5.14 based kernel and it involved the out of
>> tree gpfs module, but I believe the same thing can happen in LTS's 5.10
>> and 5.15 without out of tree modules as well. So I'd like your opinion
>> on this fix before I propose it to stable as a non-standard
>> version-specific fix (I don't think we'd want to backport fb3d824d1a46
>> with prerequisities). Thanks.
>
> I recall seeing+discussing this exact patch already a couple years ago :D
>
> Ah, here is the 5.15 version
>
> https://lkml.kernel.org/r/20221028075244.3112566-1-songyuanzheng@huawei.com
>
> And the 5.10 version
>
> https://lore.kernel.org/lkml/20221024094911.3054769-1-songyuanzheng@huawei.com/
>
>
> ... I could have sworn they got applied.
>
> ... and in linux-5.10.y I see
>
> commit 935a8b6202101d7f58fe9cd11287f9cec0d8dd32
> Author: Yuanzheng Song <songyuanzheng@huawei.com>
> Date: Fri Oct 28 03:07:05 2022 +0000
>
> mm/memory: add non-anonymous page check in the copy_present_page()
>
> The vma->anon_vma of the child process may be NULL because
> the entire vma does not contain anonymous pages. In this
> case, a BUG will occur when the copy_present_page() passes
> a copy of a non-anonymous page of that vma to the
> page_add_new_anon_rmap() to set up new anonymous rmap.
>
>
>
> Maybe you missed that the PageAnon() check is simply a couple of lines
> further down in there?
No I was only looking at the 5.15 branch so far, and seems it was never
applied there, unlike 5.10. Weird. But thanks for the heads up.
next prev parent reply other threads:[~2024-11-13 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 16:01 Vlastimil Babka
2024-11-13 16:09 ` David Hildenbrand
2024-11-13 16:18 ` Vlastimil Babka [this message]
2024-11-13 16:25 ` David Hildenbrand
2024-11-13 16:26 ` Vlastimil Babka
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=f1edffb8-921f-4d11-b691-9f7100a32c90@suse.cz \
--to=vbabka@suse.cz \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
/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