Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;