summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-03-04 11:55:29 -0800
committerLen Brown <len.brown@intel.com>2009-03-16 00:35:30 -0400
commit27ce34198345886854643b9572f9a06d2e7500d2 (patch)
treebebe7fab5eb94e8a819ac8f0d7dff08c7644b355 /drivers
parent176f9c1804df09f3e9b998c0642e212592ac6283 (diff)
acpi: check for pxm_to_node_map overflow
It is hardly (if ever) possible but in case of broken _PXM entry we could reach out of pxm_to_node_map array bounds in acpi_map_pxm_to_node() call. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/numa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index c5e292aab0e3..3a0d8ef25c75 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -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;