summaryrefslogtreecommitdiff
path: root/drivers/base/arch_numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/arch_numa.c')
-rw-r--r--drivers/base/arch_numa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c
index e18701676426..c99f2ab105e5 100644
--- a/drivers/base/arch_numa.c
+++ b/drivers/base/arch_numa.c
@@ -208,6 +208,10 @@ static int __init numa_register_nodes(void)
{
int nid;
+ /* Check the validity of the memblock/node mapping */
+ if (!memblock_validate_numa_coverage(0))
+ return -EINVAL;
+
/* Finally register nodes. */
for_each_node_mask(nid, numa_nodes_parsed) {
unsigned long start_pfn, end_pfn;