]> www.infradead.org Git - users/dwmw2/linux.git/commit
mm: numa_clear_kernel_node_hotplug: Add NUMA_NO_NODE check for node id
authorNobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Wed, 16 Oct 2024 09:21:01 +0000 (18:21 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 29 Oct 2024 04:40:40 +0000 (21:40 -0700)
commitd95fb348f0160f562ac07fa201dbbaf14524381f
tree9003ba38f1b71dc86f25b5554813e4797be1dc82
parentbc0a2f3a73fcdac651fca64df39306d1e5ebe3b0
mm: numa_clear_kernel_node_hotplug: Add NUMA_NO_NODE check for node id

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@toshiba.co.jp
Fixes: 87482708210f ("mm: introduce numa_memblks")
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Suggested-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/numa_memblks.c