From: Jason Wang <jasowang@redhat.com>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org,
Yuri Benditovich <yuri.benditovich@daynix.com>,
Jason Wang <jasowang@redhat.com>
Subject: [Qemu-devel] [PULL V2 2/3] net: skip virtio-net config of deleted nic's peers
Date: Mon, 14 Nov 2016 10:54:25 +0800 [thread overview]
Message-ID: <1479092066-20810-3-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1479092066-20810-1-git-send-email-jasowang@redhat.com>
From: Yuri Benditovich <yuri.benditovich@daynix.com>
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 | 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
next prev parent reply other threads:[~2016-11-14 2:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 2:54 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
2016-11-14 2:54 ` [Qemu-devel] [PULL V2 1/3] record/replay: add network support Jason Wang
2016-12-22 6:56 ` Pavel Dovgalyuk
2016-12-22 11:35 ` Jason Wang
2016-11-14 2:54 ` Jason Wang [this message]
2016-11-14 2:54 ` [Qemu-devel] [PULL V2 3/3] net: fix sending of data with -net socket, listen backend Jason Wang
2016-11-14 6:46 ` [Qemu-devel] [PULL V2 0/3] Net patches Zhang Chen
2016-11-15 3:19 ` Jason Wang
2016-11-14 16:40 ` Stefan Hajnoczi
2016-11-15 3:22 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479092066-20810-3-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=yuri.benditovich@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.