From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKm6s-0004wQ-N5 for qemu-devel@nongnu.org; Thu, 30 Jul 2015 07:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKm6p-0001XV-9M for qemu-devel@nongnu.org; Thu, 30 Jul 2015 07:34:50 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:48821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKm6p-0001W4-1o for qemu-devel@nongnu.org; Thu, 30 Jul 2015 07:34:47 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Jul 2015 05:34:45 -0600 From: Michael Roth Date: Thu, 30 Jul 2015 06:32:24 -0500 Message-Id: <1438255988-10418-10-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1438255988-10418-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1438255988-10418-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 09/53] virtio-net: fix the upper bound when trying to delete queues List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-stable@nongnu.org, "Michael S. Tsirkin" From: Jason Wang Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 27a46dcf5038e20451101ed2d5414aebf3846e27) Signed-off-by: Michael Roth --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 59f76bc..b6fac9c 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1309,7 +1309,7 @@ static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue) n->multiqueue = multiqueue; - for (i = 2; i <= n->max_queues * 2 + 1; i++) { + for (i = 2; i < n->max_queues * 2 + 1; i++) { virtio_del_queue(vdev, i); } -- 1.9.1