From 27ce34198345886854643b9572f9a06d2e7500d2 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 4 Mar 2009 11:55:29 -0800 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- drivers/acpi/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index c5e292aab0e..3a0d8ef25c7 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; -- cgit v1.2.3