From: "Zi Yan" <ziy@nvidia.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Michal Hocko" <mhocko@suse.com>,
"Brendan Jackman" <jackmanb@google.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Mike Rapoport" <rppt@kernel.org>, "Yu Zhao" <yuzhao@google.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] mm/page_alloc: free allocated PFNs if the range does not match
Date: Fri, 10 Jul 2026 11:11:05 -0400 [thread overview]
Message-ID: <DJUZK00N36Y6.NQP9QK7QB8BA@nvidia.com> (raw)
In-Reply-To: <9210ef86-3131-464b-93e7-336420d894d9@kernel.org>
On Fri Jul 10, 2026 at 10:45 AM EDT, David Hildenbrand (Arm) wrote:
> On 6/30/26 17:06, Zi Yan wrote:
>> On Tue Jun 30, 2026 at 9:39 AM EDT, David Hildenbrand (Arm) wrote:
>>> On 6/30/26 09:44, Vlastimil Babka (SUSE) wrote:
>>>>
>>>> So this?
>>>> Reported-by: Sashiko <sashiko-bot@kernel.org>
>>>>
>>>>
>>>> Hm well, it's a path that warns, can only happen due to a development error?
>>>> Not sure we care about stable then. Anyway.
>>>>
>>>
>>> If someone would run into the WARN we would already be in Fixes: territory.
>>>
>>> it's a path that should never be executed. If it does, the real issue must be fixed.
>>>
>>> So (a) I don't think this is stable material (b) I am skeptical that this is
>>> even a Fixes and (c) I am wondering whether we should touch this *at all*.
>>>
>>> :)
>>
>> I looked at the code again and agree with you that the code is not
>> reachable and the fix should not be in the WARN path. Theoretically, if
>> order = ilog2(end - start) is smaller than MAX_PAGE_ORDER,
>> find_large_buddy() can return an outer_start smaller than start, leading
>> to this WARN path. But currently alloc_contig_frozen_range() with
>> __GFP_COMP is used by gigantic hugetlb, thus that is not possible.
>>
>> How about
>> 1. making sure order is bigger or equal to MAX_PAGE_ORDER,
>
> Makes sense. As you say, hugetlb doesn't need something smaller.
>
>> 2. adding a comment in the WARN path to prevent someone else trying to
>> fix WARN path if Sashiko reports this again
>
>
> Agreed.
Thanks for the confirmation. I will submit a new version following these
ideas.
--
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2026-07-10 15:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 1:35 [PATCH] mm/page_alloc: free allocated PFNs if the range does not match Zi Yan
2026-06-30 2:06 ` Andrew Morton
2026-06-30 2:23 ` Zi Yan
2026-06-30 7:44 ` Vlastimil Babka (SUSE)
2026-06-30 13:39 ` David Hildenbrand (Arm)
2026-06-30 14:47 ` Lance Yang
2026-06-30 15:06 ` Zi Yan
2026-07-10 14:45 ` David Hildenbrand (Arm)
2026-07-10 15:11 ` Zi Yan [this message]
2026-07-01 13:38 ` Zi Yan
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=DJUZK00N36Y6.NQP9QK7QB8BA@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=yuzhao@google.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