]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
net: skip virtio-net config of deleted nic's peers
authorYuri Benditovich <yuri.benditovich@daynix.com>
Mon, 31 Oct 2016 22:01:17 +0000 (00:01 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 15 Nov 2016 07:36:21 +0000 (15:36 +0800)
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 <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c

index 06bfe4bcc933a11b8ac554e51b07a4e1d3a8884a..77a4fae3999f67da509aea7906eae631ca13d291 100644 (file)
@@ -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);