]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/numa: Add constraints check for nid parameters
authorPetr Holasek <pholasek@redhat.com>
Thu, 8 Dec 2011 12:16:41 +0000 (13:16 +0100)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Sat, 24 Dec 2011 00:42:14 +0000 (16:42 -0800)
commit3a3137a68c2fa7c793fa61924845ac08667e76de
tree67d03b4d76d367e40ae3a74540b4bb0084c2d503
parentad504fd81952f6b04dfc3dc783546f293278dbe1
x86/numa: Add constraints check for nid parameters

Orabug: 13522802
This patch adds constraint checks to the numa_set_distance()
function.

When the check triggers (this should not happen normally) it
emits a warning and avoids a store to a negative index in
numa_distance[] array - i.e. avoids memory corruption.

Negative ids can be passed when the pxm-to-nids mapping is not
properly filled while parsing the SRAT.

Signed-off-by: Petr Holasek <pholasek@redhat.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Anton Arapov <anton@redhat.com>
Link: http://lkml.kernel.org/r/20111208121640.GA2229@dhcp-27-244.brq.redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/numa.c