From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1LHg-0004Sl-Qp for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1LHd-0008Qy-Pn for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:42:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35358) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1LHd-0008QS-Ja for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:42:25 -0400 Date: Tue, 1 Nov 2016 00:42:22 +0200 From: "Michael S. Tsirkin" Message-ID: <20161101004216-mutt-send-email-mst@kernel.org> References: <1477951277-6924-1-git-send-email-yuri.benditovich@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477951277-6924-1-git-send-email-yuri.benditovich@daynix.com> Subject: Re: [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: yuri.benditovich@daynix.com Cc: Jason Wang , qemu-devel@nongnu.org, dmitry@daynix.com, yan@daynix.com On Tue, Nov 01, 2016 at 12:01:17AM +0200, yuri.benditovich@daynix.com wrote: > 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 Reviewed-by: Michael S. Tsirkin > --- > 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); > -- > 1.9.1