virtio-net: fix the upper bound when trying to delete queues
commit27a46dcf5038e20451101ed2d5414aebf3846e27
authorJason Wang <jasowang@redhat.com>
Thu, 23 Apr 2015 06:21:34 +0000 (23 14:21 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 27 Apr 2015 18:49:45 +0000 (27 20:49 +0200)
tree054969c217d461cb4e5de39b37f67eb40be0585d
parent294ce717e0f212ed0763307f3eab72b4a1bdf4d0
virtio-net: fix the upper bound when trying to delete queues

Virtqueue were indexed from zero, so don't delete virtqueue whose
index is n->max_queues * 2 + 1.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c