[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8ee28bfb-9434-4c3e-b039-6c80c00af1cd@huawei.com>
Date: Tue, 19 Aug 2025 20:03:53 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Yin Tirui <yintirui@...wei.com>, <robh@...nel.org>,
<saravanak@...gle.com>, <dan.j.williams@...el.com>,
<akpm@...ux-foundation.org>, <david@...hat.com>, <rppt@...nel.org>,
<Jonathan.Cameron@...wei.com>, <devicetree@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
CC: <chenjun102@...wei.com>
Subject: Re: [PATCH v3] of_numa: fix uninitialized memory nodes causing kernel
panic
On 2025/8/19 15:55, Yin Tirui wrote:
> When there are memory-only nodes (nodes without CPUs), these nodes
> are not properly initialized, causing kernel panic during boot.
>
...
>
> v2: Move the changes to the of_numa related. Correct the fixes tag.
> v3: Only amend commit message with no code changes.
>
This part should be moved under "---",
Reviewed-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> Cc: stable@...r.kernel.org
> Fixes: 767507654c22 ("arch_numa: switch over to numa_memblks")
> Signed-off-by: Yin Tirui <yintirui@...wei.com>
> Acked-by: David Hildenbrand <david@...hat.com>
> ---
> drivers/of/of_numa.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
> index 230d5f628c1b..cd2dc8e825c9 100644
> --- a/drivers/of/of_numa.c
> +++ b/drivers/of/of_numa.c
> @@ -59,8 +59,11 @@ static int __init of_numa_parse_memory_nodes(void)
> r = -EINVAL;
> }
>
> - for (i = 0; !r && !of_address_to_resource(np, i, &rsrc); i++)
> + for (i = 0; !r && !of_address_to_resource(np, i, &rsrc); i++) {
> r = numa_add_memblk(nid, rsrc.start, rsrc.end + 1);
> + if (!r)
> + node_set(nid, numa_nodes_parsed);
> + }
>
> if (!i || r) {
> of_node_put(np);
Powered by blists - more mailing lists