From: Jason Wang <jasowang@redhat.com>
To: peter.maydell@linaro.org, stefanha@gmail.com
Cc: qemu-devel@nongnu.org,
Yuri Benditovich <yuri.benditovich@daynix.com>,
Jason Wang <jasowang@redhat.com>
Subject: [Qemu-devel] [PULL V3 1/3] net: skip virtio-net config of deleted nic's peers
Date: Tue, 15 Nov 2016 15:43:48 +0800 [thread overview]
Message-ID: <1479195830-4725-2-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1479195830-4725-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-15 7:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 7:43 [Qemu-devel] [PULL V3 0/3] Net patches Jason Wang
2016-11-15 7:43 ` Jason Wang [this message]
2016-11-15 7:43 ` [Qemu-devel] [PULL V3 2/3] net: fix sending of data with -net socket, listen backend Jason Wang
2016-11-15 7:43 ` [Qemu-devel] [PULL V3 3/3] docs: fix COLO architecture diagram Jason Wang
2016-11-15 11:23 ` [Qemu-devel] [PULL V3 0/3] Net patches Stefan Hajnoczi
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=1479195830-4725-2-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).