From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6YPQ-0007qh-3K for qemu-devel@nongnu.org; Tue, 15 Nov 2016 02:44:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6YPO-0002QS-JZ for qemu-devel@nongnu.org; Tue, 15 Nov 2016 02:44:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53108) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6YPO-0002QL-E4 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 02:43:58 -0500 From: Jason Wang Date: Tue, 15 Nov 2016 15:43:48 +0800 Message-Id: <1479195830-4725-2-git-send-email-jasowang@redhat.com> In-Reply-To: <1479195830-4725-1-git-send-email-jasowang@redhat.com> References: <1479195830-4725-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PULL V3 1/3] net: skip virtio-net config of deleted nic's peers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org, stefanha@gmail.com Cc: qemu-devel@nongnu.org, Yuri Benditovich , Jason Wang From: Yuri Benditovich https://bugzilla.redhat.com/show_bug.cgi?id=1373816 qemu core dump happens during repetitive unpug-plug with multiple queues and Windows RSS-capable guest. If back-end delete requested during virtio-net device initialization, driver still can try configure the device for multiple queues. The virtio-net device is expected to be removed as soon as the initialization is done. Signed-off-by: Yuri Benditovich Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 06bfe4b..77a4fae 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -508,6 +508,10 @@ static void virtio_net_set_queues(VirtIONet *n) int i; int r; + if (n->nic->peer_deleted) { + return; + } + for (i = 0; i < n->max_queues; i++) { if (i < n->curr_queues) { r = peer_attach(n, i); -- 2.7.4