Skip to content

Commit 06eaa82

Browse files
RichardWeiYangrppt
authored andcommitted
mm/memblock: pass size instead of end to memblock_set_node()
The second parameter of memblock_set_node() is size instead of end. Since it iterates from lower address to higher address, finally the node id is correct. But during the process, some of them are wrong. Pass size instead of end. Fixes: 61167ad ("mm: pass nid to reserve_bootmem_region()") Signed-off-by: Wei Yang <richard.weiyang@gmail.com> CC: Mike Rapoport <rppt@kernel.org> CC: Yajun Deng <yajun.deng@linux.dev> CC: stable@vger.kernel.org Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20250318071948.23854-2-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
1 parent ed471e1 commit 06eaa82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memblock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ static void __init memmap_init_reserved_pages(void)
21962196
if (memblock_is_nomap(region))
21972197
reserve_bootmem_region(start, end, nid);
21982198

2199-
memblock_set_node(start, end, &memblock.reserved, nid);
2199+
memblock_set_node(start, region->size, &memblock.reserved, nid);
22002200
}
22012201

22022202
/*

0 commit comments

Comments
 (0)