On 3/18/25 12:49, Wei Yang wrote: > 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. Makes sense. > > Fixes: 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") The commit is correct here which had introduced the problem. > Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> > CC: Mike Rapoport <rppt@xxxxxxxxxx> > CC: Yajun Deng <yajun.deng@xxxxxxxxx> > CC: <stable@xxxxxxxxxxxxxxx> > --- > mm/memblock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memblock.c b/mm/memblock.c > index 64ae678cd1d1..85442f1b7f14 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -2192,7 +2192,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); > } > > /* Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>