Skip to contentSkip to conversation

mm-sparse-guard-the-size-of-mem_section-is-power-of-2.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 6, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/sparse: guard the size of mem_section is power of 2
has been removed from the -mm tree. Its filename was
mm-sparse-guard-the-size-of-mem_section-is-power-of-2.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: Wei Yang <[email protected]>
Subject: mm/sparse: guard the size of mem_section is power of 2
Date: Tue, 16 Apr 2024 01:25:59 +0000

We usually have this check, while commit 2a3cb8baef71 ("mm/sparse: delete old sparse_init and enable new one") missed to take it.

---

 mm/sparse.c |    2 ++
 1 file changed, 2 insertions(+)
mm/sparse.c renamed from mm/sparse.c~mm-sparse-guard-the-size-of-mem_section-is-power-of-2 +2 -0
@@ -560,6 +560,8 @@ void __init sparse_init(void)
 	unsigned long pnum_end, pnum_begin, map_count = 1;
 	int nid_begin;
 
+	/* see include/linux/mmzone.h 'struct mem_section' definition */
+	BUILD_BUG_ON(!is_power_of_2(sizeof(struct mem_section)));
 	memblocks_present();
 
 	pnum_begin = first_present_section_nr();

_

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