From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Wei Yang <richard.weiyang@gmail.com>,
rppt@kernel.org, akpm@linux-foundation.org, yajun.deng@linux.dev
Cc: linux-mm@kvack.org, stable@vger.kernel.org
Subject: Re: [Patch v2 1/3] mm/memblock: pass size instead of end to memblock_set_node()
Date: Tue, 18 Mar 2025 15:59:57 +0530 [thread overview]
Message-ID: <d97659e0-850b-46f5-8fb2-25b531adf75a@arm.com> (raw)
In-Reply-To: <20250318071948.23854-2-richard.weiyang@gmail.com>
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@gmail.com>
> CC: Mike Rapoport <rppt@kernel.org>
> CC: Yajun Deng <yajun.deng@linux.dev>
> CC: <stable@vger.kernel.org>
> ---
> 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@arm.com>
next prev parent reply other threads:[~2025-03-18 10:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 7:19 [Patch v2 0/3] memblock: some fix for memmap_init_reserved_pages() Wei Yang
2025-03-18 7:19 ` [Patch v2 1/3] mm/memblock: pass size instead of end to memblock_set_node() Wei Yang
2025-03-18 10:29 ` Anshuman Khandual [this message]
2025-03-18 7:19 ` [Patch v2 2/3] mm/memblock: repeat setting reserved region nid if array is doubled Wei Yang
2025-03-18 10:55 ` Anshuman Khandual
2025-03-19 8:12 ` Wei Yang
2025-03-18 7:19 ` [Patch v2 3/3] memblock tests: add test for memblock_set_node Wei Yang
2025-04-07 2:58 ` [Patch v2 0/3] memblock: some fix for memmap_init_reserved_pages() Wei Yang
2025-04-07 6:34 ` Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d97659e0-850b-46f5-8fb2-25b531adf75a@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=richard.weiyang@gmail.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yajun.deng@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox