Skip to contentSkip to conversation

mm-memblock-fix-arguments-passed-to-memblock_set_node.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Apr 28, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: memblock: fix arguments passed to memblock_set_node()
has been removed from the -mm tree. Its filename was
mm-memblock-fix-arguments-passed-to-memblock_set_node.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: "Bernardo C. Gutierrez Cantu" <[email protected]>
Subject: mm: memblock: fix arguments passed to memblock_set_node()
Date: Fri, 25 Apr 2025 10:20:03 +0000

memblock_set_node() receives a base and a size arguments, but we are passing the start and end of the memory regions when iterating over them in memmap_init_reserved_pages() to set their node ids.

This results in the function setting the node ids for the reserved memory regions in [base, base + base + size) instead of [base, base + size).

Pass start and size, so that we iterate over the correct range.

Fixes 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()")
Cc Mike Rapoport <[email protected]>
Cc Yajun Deng <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Huang Pei <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>

---

 mm/memblock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memblock.c renamed from mm/memblock.c~mm-memblock-fix-arguments-passed-to-memblock_set_node +1 -1
@@ -2196,7 +2196,7 @@ static void __init memmap_init_reserved_
 		if (memblock_is_nomap(region))
 			reserve_bootmem_region(start, end, nid);
 
-		memblock_set_node(start, end, &memblock.reserved, nid);
+		memblock_set_node(start, region->size, &memblock.reserved, nid);
 	}
 
 	/*

_

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