Received: by 10.223.176.5 with SMTP id f5csp693367wra; Fri, 9 Feb 2018 05:48:56 -0800 (PST) X-Google-Smtp-Source: AH8x226LJv4qFqRMMXBmcwubYIyZ7tngl8Z059SA0VUOvHvyXapYQWS1tUpoQuXewRNw6iJFfVvD X-Received: by 10.98.152.208 with SMTP id d77mr2947471pfk.108.1518184136011; Fri, 09 Feb 2018 05:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518184135; cv=none; d=google.com; s=arc-20160816; b=c9JJFrN4YEujvInf0HrVXeo0SkFOVlaOmfy+fCwhbiw9sos/toJkWc5e4xv+Tsx4GY J16ep9ix6VBrSCqPHhXpI0Q6jEqtzGIVWWXg1S3d2C97YLR6po/lojW2/ZwpqkSoErjt Iw9yAUbikpSlHcqoJNc7vnpYTttdjSGjG3DdxTvTrMQpp+eXDQkg/eEeh4TFZe63uEbY J1tcyTm9pTFdJPTQEn6MITc5UJpqxuJq4ir3B+ayn9iPeydZoC5Iu6ya2ca1esk1aGH+ TGwjBzUYSNOL2irkcTUz6uekY6DEyId5RfhuTC2cuCj/BCIDODzr/4995NkSN0dg7VYw BJLg== 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=0kCqkTFR8fU7K2CTsaJWB8RoZeMumHJBZtqyqI4J91w=; b=x+jiWhxR57chjrEpFKtIqNYfF97uHbGtiVe43X1yiA46kyUHqwj/9AJxmya+OUYxBD cVj5Pudm6D3azPA3JZDklaWcWyXCMkB78bFM2py1O1gYeJSBLJkWVhixLNrzSPjGkz4v KKnGL0dSm/9cREt68AOSJ/EaIHQ6YoNPyYLvLc5E9TdfEQkQy/BYHUd1jhntcLvpVAvl oCvS/FgYBwnerL5eFjvVVpLm8RLNfUcv/ddgysRyDI3UKhddRUY7KWmsTaCtdh2w5blC 1WDALSYtEvcRCwhiSZs7UC6o7nZ0a5S67tejJZAcz9Yrydmg276En+AP7a7E9hkNTNpf fABg== 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 o184si1396461pga.818.2018.02.09.05.48.41; Fri, 09 Feb 2018 05:48:55 -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 S932220AbeBINrM (ORCPT + 99 others); Fri, 9 Feb 2018 08:47:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:53592 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752537AbeBINrH (ORCPT ); Fri, 9 Feb 2018 08:47:07 -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 61136E06; Fri, 9 Feb 2018 13:47:06 +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.15 07/23] vhost_net: stop device during reset owner Date: Fri, 9 Feb 2018 14:40:05 +0100 Message-Id: <20180209133938.758131929@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133938.366024920@linuxfoundation.org> References: <20180209133938.366024920@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.15-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 @@ -1208,6 +1208,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: