Received: by 10.223.176.5 with SMTP id f5csp703280wra; Fri, 9 Feb 2018 05:58:53 -0800 (PST) X-Google-Smtp-Source: AH8x226oILsVARtzHBQVOCf//9B1ieztUhjZGxY+SgQGKXd+GSHTDOBg32xUMVcFtvl2XhpxhRPt X-Received: by 2002:a17:902:8d81:: with SMTP id v1-v6mr2669594plo.430.1518184733429; Fri, 09 Feb 2018 05:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518184733; cv=none; d=google.com; s=arc-20160816; b=jkY6PCHbJRQFFksAeL1tb1+wJz1ARLUvmOkl0Zx65XKV85S5TTHXpCHKNgYvpnruMB Iodisjw1lrT5kcC1Gxd6LmhZrR/HJie6uhLRkMxUqFi8syjzIWtG9asiRFhxKpzlAH7i JNGvPalrdf8gDqQPptR/CIcxhCOaUyu44egqm5DyAf2ciaFHwI5clx2io2KNJVocyKFI zHdPO3DygAEA5EDtQmfWUKwZuspZToTXCzVU3Ljl3tfF+81RIRKSWB5iDncOmcK9toN5 6ZzvepTQiFIcH9yF8ZcfkCIMMFuUGJbgwX84fo8lcPG+dycCU2H95Fbi23G1bqT5PvnK 2uag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=m6LNs2srpzOrVEG8OEW8kMSB1qHuYoG9Vcd1ggroqqk=; b=d1jTaySIJUmv3p5z543I+aFYjyfPKfUwq3/gWV5xi5yjcopA/NFZVmW5WkNgmnzAhr FSXocZGZbCwc9SZ5C4IMWCjzC37Q6DXZdXT+LjiM8QoA5vowPExbM2nmeKX4QSFZSUy3 03yHEU0HS2+8GhjP4lNOfbxqyQNBafD0YWgIf4KsHHjCLIBG0U+9/3Fq4Lc8unF2UN8D 8eynQi4SVmxW7kzM1p1z8jJq7pd2ngnF7hCj+aq976vfZraPlocDLtpRHABjC6x5ekjP alCYGFu3A0Ih6g9KgD/VDzv5Cc71yyvVSaODlzbTkhIZVeg9pwsLSSTaxqH/0fZqQ9Nq /N+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si1403124pgp.153.2018.02.09.05.58.39; Fri, 09 Feb 2018 05:58:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753717AbeBIN4s (ORCPT + 99 others); Fri, 9 Feb 2018 08:56:48 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51662 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753058AbeBINpB (ORCPT ); Fri, 9 Feb 2018 08:45:01 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C52F010C4; Fri, 9 Feb 2018 13:45:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+eb17c6162478cc50632c@syzkaller.appspotmail.com, Jason Wang , "David S. Miller" Subject: [PATCH 4.14 10/22] vhost_net: stop device during reset owner Date: Fri, 9 Feb 2018 14:39:59 +0100 Message-Id: <20180209133934.805941111@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133934.024795822@linuxfoundation.org> References: <20180209133934.024795822@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jason Wang [ Upstream commit 4cd879515d686849eec5f718aeac62a70b067d82 ] We don't stop device before reset owner, this means we could try to serve any virtqueue kick before reset dev->worker. This will result a warn since the work was pending at llist during owner resetting. Fix this by stopping device during owner reset. Reported-by: syzbot+eb17c6162478cc50632c@syzkaller.appspotmail.com Fixes: 3a4d5c94e9593 ("vhost_net: a kernel-level virtio server") Signed-off-by: Jason Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/vhost/net.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1212,6 +1212,7 @@ static long vhost_net_reset_owner(struct } vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); + vhost_dev_stop(&n->dev); vhost_dev_reset_owner(&n->dev, umem); vhost_net_vq_reset(n); done: