diff options
author | Cyrill Gorcunov | 2009-03-04 20:55:29 +0100 |
---|---|---|
committer | Len Brown | 2009-03-16 05:35:30 +0100 |
commit | 27ce34198345886854643b9572f9a06d2e7500d2 (patch) | |
tree | bebe7fab5eb94e8a819ac8f0d7dff08c7644b355 | |
parent | ACPI: remove doubled status checking (diff) | |
download | kernel-qcow2-linux-27ce34198345886854643b9572f9a06d2e7500d2.tar.gz kernel-qcow2-linux-27ce34198345886854643b9572f9a06d2e7500d2.tar.xz kernel-qcow2-linux-27ce34198345886854643b9572f9a06d2e7500d2.zip |
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>
-rw-r--r-- | drivers/acpi/numa.c | 2 |
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; |