The patch titled Subject: mm: numa_clear_kernel_node_hotplug: Add NUMA_NO_NODE check for node id has been added to the -mm mm-hotfixes-unstable branch. Its filename is mm-numa_clear_kernel_node_hotplug-add-numa_no_node-check-for-node-id.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-numa_clear_kernel_node_hotplug-add-numa_no_node-check-for-node-id.patch This patch will later appear in the mm-hotfixes-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx> Subject: mm: numa_clear_kernel_node_hotplug: Add NUMA_NO_NODE check for node id Date: Wed, 16 Oct 2024 18:21:01 +0900 The acquired memory blocks for reserved may include blocks outside of memory management. In this case, the nid variable is set to NUMA_NO_NODE (-1), so an error occurs in node_set(). This adds a check using numa_valid_node() to numa_clear_kernel_node_hotplug() that skips node_set() when nid is set to NUMA_NO_NODE. Link: https://lkml.kernel.org/r/1729070461-13576-1-git-send-email-nobuhiro1.iwamatsu@xxxxxxxxxxxxx Fixes: 87482708210f ("mm: introduce numa_memblks") Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx> Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx> Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx> Suggested-by: Yuji Ishikawa <yuji2.ishikawa@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/numa_memblks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/numa_memblks.c~mm-numa_clear_kernel_node_hotplug-add-numa_no_node-check-for-node-id +++ a/mm/numa_memblks.c @@ -349,7 +349,7 @@ static void __init numa_clear_kernel_nod for_each_reserved_mem_region(mb_region) { int nid = memblock_get_region_node(mb_region); - if (nid != MAX_NUMNODES) + if (numa_valid_node(nid)) node_set(nid, reserved_nodemask); } _ Patches currently in -mm which might be from nobuhiro1.iwamatsu@xxxxxxxxxxxxx are mm-numa_clear_kernel_node_hotplug-add-numa_no_node-check-for-node-id.patch