acpi: check for pxm_to_node_map overflow
[pandora-kernel.git] / drivers / acpi / numa.c
index c5e292a..3a0d8ef 100644 (file)
@@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle)
        int pxm, node = -1;
 
        pxm = acpi_get_pxm(handle);
-       if (pxm >= 0)
+       if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
                node = acpi_map_pxm_to_node(pxm);
 
        return node;