Commit 27ce3419 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Len Brown

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: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 176f9c18
...@@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle) ...@@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle)
int pxm, node = -1; int pxm, node = -1;
pxm = acpi_get_pxm(handle); pxm = acpi_get_pxm(handle);
if (pxm >= 0) if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
node = acpi_map_pxm_to_node(pxm); node = acpi_map_pxm_to_node(pxm);
return node; return node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment