mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
176f9c1804
commit
27ce341983
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue