numa: Fix off-by-one error at MAX_CPUMASK_BITS check
commited26b92290768818371fbfd4317988eab6009ad5
authorEduardo Habkost <ehabkost@redhat.com>
Thu, 12 Feb 2015 17:23:48 +0000 (12 15:23 -0200)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 19 Mar 2015 19:01:22 +0000 (19 16:01 -0300)
treef31e7a6df06773ca7753b5161d223a92413a7506
parent3e5f6234b4f45a11b7c357dde2d6da36641bc6f6
numa: Fix off-by-one error at MAX_CPUMASK_BITS check

Fix the CPU index check to ensure we don't go beyond the size of the
node_cpu bitmap.

CPU index is always less than MAX_CPUMASK_BITS, as documented at
sysemu.h:

> The following shall be true for all CPUs:
>   cpu->cpu_index < max_cpus <= MAX_CPUMASK_BITS

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
numa.c