Skip to contentSkip to conversation

mm-sparse-check-memmap-alignment-for-compound_info_has_mask.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 24

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/sparse: check memmap alignment for compound_info_has_mask()
has been removed from the -mm tree. Its filename was
mm-sparse-check-memmap-alignment-for-compound_info_has_mask.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Kiryl Shutsemau <[email protected]>
Subject: mm/sparse: check memmap alignment for compound_info_has_mask()
Date: Fri, 27 Feb 2026 19:42:46 +0000

If page->compound_info encodes a mask, it is expected that vmemmap to be naturally aligned to the maximum folio size.

Add a VM_WARN_ON_ONCE() to check the alignment.

Cc Albert Ou <[email protected]>
Cc Alexandre Ghiti <[email protected]>
Cc Baoquan He <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc David Hildenbrand (arm) <[email protected]>
Cc David Rientjes <[email protected]>
Cc Frank van der Linden <[email protected]>
Cc Harry Yoo <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Muchun Song <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Usama Arif <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc WANG Xuerui <[email protected]>

---

 mm/sparse.c |    5 +++++
 1 file changed, 5 insertions(+)
mm/sparse.c renamed from mm/sparse.c~mm-sparse-check-memmap-alignment-for-compound_info_has_mask +5 -0
@@ -600,6 +600,11 @@ void __init sparse_init(void)
 	BUILD_BUG_ON(!is_power_of_2(sizeof(struct mem_section)));
 	memblocks_present();
 
+	if (compound_info_has_mask()) {
+		VM_WARN_ON_ONCE(!IS_ALIGNED((unsigned long) pfn_to_page(0),
+				    MAX_FOLIO_VMEMMAP_ALIGN));
+	}
+
 	pnum_begin = first_present_section_nr();
 	nid_begin = sparse_early_nid(__nr_to_section(pnum_begin));
 

_

Patches currently in -mm which might be from [email protected] are