Skip to content

Commit

Permalink
acpi: check for pxm_to_node_map overflow
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
cyrillos authored and lenb committed Mar 16, 2009
1 parent 176f9c1 commit 27ce341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 27ce341

Please sign in to comment.