diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 2de62385e3367a7de24aecfa4a3fb159f7e726ad..6cb0396c87daa3ebfeeb147d8e4611355a8362f6 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1058,6 +1058,11 @@ int __ref add_memory_resource(int nid, struct resource *res, bool online) if (ret) return ret; + if (!node_possible(nid)) { + WARN(1, "node %d was absent from the node_possible_map\n", nid); + return -EINVAL; + } + mem_hotplug_begin(); /*