aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2025-03-18 07:19:46 +0000
committerMike Rapoport (Microsoft) <[email protected]>2025-04-07 06:28:01 +0000
commit06eaa824fd239edd1eab2754f29b2d03da313003 (patch)
treebebed8efc81ed2f644bb7ef84011ed41226d98a3 /mm/memblock.c
parentmemblock tests: Fix mutex related build error (diff)
downloadkernel-06eaa824fd239edd1eab2754f29b2d03da313003.tar.gz
kernel-06eaa824fd239edd1eab2754f29b2d03da313003.zip
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: 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") Signed-off-by: Wei Yang <[email protected]> CC: Mike Rapoport <[email protected]> CC: Yajun Deng <[email protected]> CC: [email protected] Reviewed-by: Anshuman Khandual <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 0a53db4d9f7b..9639f04b4fdf 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -2196,7 +2196,7 @@ static void __init memmap_init_reserved_pages(void)
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);
}
/*