From: Muchun Song <muchun.song@linux.dev>
To: Michal Clapinski <mclapinski@google.com>
Cc: Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
Kiryl Shutsemau <kas@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: init tails before init_migratetype
Date: Mon, 22 Jun 2026 23:22:40 +0800 [thread overview]
Message-ID: <73F7E404-4E8A-494C-8574-8C6723EB50A7@linux.dev> (raw)
In-Reply-To: <20260622101901.223961-1-mclapinski@google.com>
> On Jun 22, 2026, at 18:19, Michal Clapinski <mclapinski@google.com> wrote:
>
> Currently, if you enable HVO, DEFERRED_STRUCT_PAGE_INIT and VM_DEBUG
> the kernel will crash with the following stack trace
>
> get_pfnblock_bitmap_bitidx
> __set_pfnblock_flags_mask
> hugetlb_bootmem_init_migratetype
> prep_and_add_bootmem_folios
> gather_bootmem_prealloc_node
> gather_bootmem_prealloc_parallel
> padata_do_multithreaded
> gather_bootmem_prealloc
> hugetlb_init
>
> on this code
>
> VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page);
>
> This code looks inside the struct page which will be uninitialized
> for hugetlb tail pages, which will cause a false positive.
>
> So let's initialize the tail pages before this happens.
>
> Fixes: 622026e87c40 ("mm/hugetlb: remove fake head pages")
> Signed-off-by: Michal Clapinski <mclapinski@google.com>
Thanks for catching this! Your fix is perfectly correct and addresses
a real issue. I just wanted to let you know that a similar fix was
actually submitted a few days ago in patch [1].
[1] https://lore.kernel.org/linux-mm/20260612035903.2468601-2-songmuchun@bytedance.com/
Muchun,
Thanks.
prev parent reply other threads:[~2026-06-22 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 10:19 Michal Clapinski
2026-06-22 15:09 ` Kiryl Shutsemau
2026-06-22 15:22 ` Muchun Song [this message]
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=73F7E404-4E8A-494C-8574-8C6723EB50A7@linux.dev \
--to=muchun.song@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=kas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mclapinski@google.com \
--cc=osalvador@suse.de \
--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
all inboxes | Powered by JetHome®