[RFC PATCH v3 27/31] mm/memory_hotplug: VM_BUG if nid is too large.
From: Cody P Schafer
Date: Thu May 02 2013 - 20:07:36 EST
Signed-off-by: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx>
---
mm/memory_hotplug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 8e6658d..320d914 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1071,6 +1071,8 @@ int __mem_online_node(int nid)
pg_data_t *pgdat;
int ret;
+ VM_BUG_ON(nid >= nr_node_ids);
+
pgdat = hotadd_new_pgdat(nid, 0);
if (!pgdat)
return -ENOMEM;
--
1.8.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/