]> git.proxmox.com Git - mirror_qemu.git/commit - numa.c
numa: Reject duplicate node IDs
authorEduardo Habkost <ehabkost@redhat.com>
Thu, 26 Jun 2014 21:33:19 +0000 (18:33 -0300)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 29 Jun 2014 15:59:42 +0000 (18:59 +0300)
commit1945b9d8b03aad59e86bfe3a3194e6bbeffbad6a
treeffadce6c79151ed73ec25c4e3a0714f6230f1916
parent1af878e0497a885b6cbdd3a6d91d399f4851d99c
numa: Reject duplicate node IDs

The same nodeid shouldn't appear multiple times in the command-line.

In addition to detecting command-line mistakes, this will fix a bug
where nb_numa_nodes may become larger than MAX_NODES (and cause
out-of-bounds access on the numa_info array).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
numa.c