From patchwork Mon Oct 31 22:01:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuri Benditovich X-Patchwork-Id: 9406835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A50C660721 for ; Tue, 1 Nov 2016 02:50:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 924082941E for ; Tue, 1 Nov 2016 02:50:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8707429421; Tue, 1 Nov 2016 02:50:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5735D2941E for ; Tue, 1 Nov 2016 02:50:40 +0000 (UTC) Received: from localhost ([::1]:39533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1P9q-0000eM-Fc for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Oct 2016 22:50:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1KeH-0007lb-90 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:01:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1KeE-0001FD-5Q for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:01:45 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1KeD-0001F5-Tf for qemu-devel@nongnu.org; Mon, 31 Oct 2016 18:01:42 -0400 Received: by mail-wm0-x244.google.com with SMTP id 68so13510369wmz.2 for ; Mon, 31 Oct 2016 15:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=xUSeqD5YwrOJmI/huwbqwNhxVJq4dTeA6fmhvVONbn8=; b=gEIpuNX65gAWU0br7NwTgmBG0hxFKjHGCtQZipPAXfaVTSdxCkDWEB/KL66pJLTIsr BpnXsnpDEGOAIF2qgDszsMQ2TRbLnDa6+mhzFTbPK+9/IJmzTA4XMfBSiaN4y9G+0imv c5Kot0K6IzDer6QBlztU1ZwqreTeEwqqm2MyRZuYOzsW74IoQuxKlheLAL3GiOzlYFxO FG+gH7vXKgE/WEQd0g7QYpgqyVHxGBe8/3aRLthkbt5eph5yeLpeVy6LwDGHWu8CWDGo Di9h4snOKe2gODnhrjIoeffdtKTbGJ5kiOolgyrr1lAnPtq6BHL3r5TRLrt6HEXkvy2A ejmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xUSeqD5YwrOJmI/huwbqwNhxVJq4dTeA6fmhvVONbn8=; b=HFEEsYUxbk+LOMpYeyiFAECK1zwYLtl7QbRTsGXMxR2CxNpizJudkfMOhjHJYaj9Ii /Y2W/Uv2SELTRrJvj2lppKQucAAXM+OWevtxYqxFeiirPnR+qj/JXLKnMvTfgxIvfPN8 mN9LDTgtD0Ok4Fta6rJZrmCEUwb6Rgh9EItRpnbcNFXXpF9LL9DB+mfQJnZ5slmUyTtz JTczEmeP3XaGHbOijT9x1Wca8fJcdsu6v7lxFg9wGKivYMbYfYzxvaNgyf8nSGsizEe3 olsSgGYqnn/oQYD3vCkoLKHdNszFPpn+/gNUVoWdaTcEtl6ZP84kmfCzVvtXx6jECReL bwsA== X-Gm-Message-State: ABUngvd8CMODQPqOXlLhrXmDYNhu7Gkgw4nBxiEEdflCerEeG0VVwsYHIrIzgV2E2KVQ9w== X-Received: by 10.194.93.101 with SMTP id ct5mr23812852wjb.11.1477951300243; Mon, 31 Oct 2016 15:01:40 -0700 (PDT) Received: from localhost.localdomain ([141.226.163.133]) by smtp.gmail.com with ESMTPSA id hy10sm24394717wjb.10.2016.10.31.15.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 15:01:39 -0700 (PDT) From: yuri.benditovich@daynix.com To: "Michael S . Tsirkin" , Jason Wang , qemu-devel@nongnu.org Date: Tue, 1 Nov 2016 00:01:17 +0200 Message-Id: <1477951277-6924-1-git-send-email-yuri.benditovich@daynix.com> X-Mailer: git-send-email 2.7.0.windows.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 X-Mailman-Approved-At: Mon, 31 Oct 2016 22:50:15 -0400 Subject: [Qemu-devel] [PATCH 1/1] net: skip virtio-net config of deleted nic's peers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmitry@daynix.com, yan@daynix.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);