From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B09E0314D13 for ; Mon, 22 Jun 2026 15:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782141818; cv=none; b=s4FxhSNPsm4sEkMtFKJbdwbNwC9fnLLGKCuB6uI96Nj2FYAznqK1atr6WDmAL5geJg0dvHf4jqBcENulp4d6S+wDpjdNAaeXUThCqxk7zOccFn8V3GDQCgphkl23OSMBJw7Ip5yNaS3Xn6PpVFfrLd2YkwFLKlwl2N1e5/s23II= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782141818; c=relaxed/simple; bh=PmakUKuILXFzmTyxIL7saKNm9RNkS5X44mNmXMdfUyc=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=tWlBOc0rRBf1I6KV++qBC48gMvpXP50Kwjrepv1NPsVPH2HiTjTjLTd9NkbRBkG92mfKlBqHHVfOLpgurF6/jdP5XS/YCG5nvKFVOVTuFommavocT2e/X6l9IcIqYydASt+8Di8rHNmFFHOsAo70Gn5rm67jXQwJr13xmdTyt4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=hLlnHs9Y; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="hLlnHs9Y" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1782141813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PmakUKuILXFzmTyxIL7saKNm9RNkS5X44mNmXMdfUyc=; b=hLlnHs9YEk9awhob5sNYldC/+Ensz4LNwFAgu6OQ8A6KPUane3W+/raLNH5o+NgXUUNyr9 +C0fLltMVFPdoi/pR9tFsa/DeJ//2IErta0aUnaZhcBHL9h+yOw8/psS3JQLy5Q9yaxomx XBoKYqEBrrDM990wgPik3NLztendpEo= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH] mm/hugetlb: init tails before init_migratetype X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20260622101901.223961-1-mclapinski@google.com> Date: Mon, 22 Jun 2026 23:22:40 +0800 Cc: Oscar Salvador , David Hildenbrand , Andrew Morton , "Vlastimil Babka (SUSE)" , Kiryl Shutsemau , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <73F7E404-4E8A-494C-8574-8C6723EB50A7@linux.dev> References: <20260622101901.223961-1-mclapinski@google.com> To: Michal Clapinski X-Migadu-Flow: FLOW_OUT > On Jun 22, 2026, at 18:19, Michal Clapinski = wrote: >=20 > Currently, if you enable HVO, DEFERRED_STRUCT_PAGE_INIT and VM_DEBUG > the kernel will crash with the following stack trace >=20 > 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 >=20 > on this code >=20 > VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page); >=20 > This code looks inside the struct page which will be uninitialized > for hugetlb tail pages, which will cause a false positive. >=20 > So let's initialize the tail pages before this happens. >=20 > Fixes: 622026e87c40 ("mm/hugetlb: remove fake head pages") > Signed-off-by: Michal Clapinski 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@byted= ance.com/ Muchun, Thanks.