Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1934517ima; Thu, 25 Oct 2018 07:14:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5eO4AZxo85Z9YlVA0y4d9SWGtR59e5mk8rBWDug4Ss2ViXytWBRhg8ZVdKMB90p6lSyw7gE X-Received: by 2002:a17:902:bd8d:: with SMTP id q13-v6mr1685141pls.167.1540476898006; Thu, 25 Oct 2018 07:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476897; cv=none; d=google.com; s=arc-20160816; b=WNd1jcqAIhOeIm6/qBPxp+eF7kbhmjrZ6VfTcTVjyNMKOTTxwI0NGETCJrSKR49zAN lFiy128iim2vhW7el0bC9QMb2Xq9KtLbh1Fc94RZd9EibO+Hf4EnaZ10kcF8ZN0umIjc icINpfCbmHhwW+QBMk7voZnuRi5BF0qhlQ8Ku00yyE8Vtczs8scqeEH2UKRRYZFlRhRY E2bM0MG968KinRQFK0gi0DwygW6qBS+ga9fvo4Mk6KhRzPRV/3SpR7aJCsJKV+MwfocI Hdh6GQLXD99sF2SvmGpVT4ugm6Dt1e8aSNj1YRIeUaFkr1uOpV+HrNUa+GentlYb8eLD N+zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=qUPEGkwWGQt+4kz4Jbs3/MYb3PfGQZlllri0CQTN0YM=; b=T6ynasbmTTzjbUPBg98Z33eusRbPVYSGbD5okhyxvXXkkG3g3fuACnUOhBpm7toyzi 36Vc0nKXbkJ/PrOdQaQ/5C45fohESAR2cmK1QhrwjsjuRNOJUp28lSAJZXYIqkhKFC/P WdfVN05uSR6C0q2MCvyHVGmfGQO4qUUDtI/lOeubPLJWH6wa5ZRZ5eBqUp3cwcNmmw85 z1BdKCAIwIcfzmqTg13XmyrwNzzkX9kjsDnKI747UvOJeW0AW7Ex/d2JxoKo1ogGmcyG z5wKz3BIPxVTiB5Kt7/LNC8ZfrvbnjVKmNcsoJjqTQFpSTDXsBtKWyKfJIy2+ZMDAKLw 63mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ak3c3jAm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h131-v6si8116370pgc.122.2018.10.25.07.14.26; Thu, 25 Oct 2018 07:14:57 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Ak3c3jAm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbeJYWod (ORCPT + 99 others); Thu, 25 Oct 2018 18:44:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:53420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727531AbeJYWoc (ORCPT ); Thu, 25 Oct 2018 18:44:32 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3394B20869; Thu, 25 Oct 2018 14:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476697; bh=TN1EuBqBQAIby0cRodcyfMdJV+9MbDV5vOtkF7Ly9fc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ak3c3jAmNW9Fdf5uDPM0n1/ranhUfZHJuah7UflVp37N2z/f3TFB79B6j4a+4CrTn nBlgQ6ucFb33p9ezfvDxqwi0tRuZGJaetYIouPHSTojvvtfl5Mk40qJgf4A2xE9Env JVZKUenC2mfpDkPt5AvY499XZb3di7NE2T/68SiQ= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ross Lagerwall , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.14 30/46] xen-netfront: Fix mismatched rtnl_unlock Date: Thu, 25 Oct 2018 10:10:37 -0400 Message-Id: <20181025141053.213330-30-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ross Lagerwall [ Upstream commit cb257783c2927b73614b20f915a91ff78aa6f3e8 ] Fixes: f599c64fdf7d ("xen-netfront: Fix race between device setup and open") Reported-by: Ben Hutchings Signed-off-by: Ross Lagerwall Reviewed-by: Juergen Gross Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/xen-netfront.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index ca239912c0e6..6ea95b316256 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1824,7 +1824,7 @@ static int talk_to_netback(struct xenbus_device *dev, err = xen_net_read_mac(dev, info->netdev->dev_addr); if (err) { xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename); - goto out; + goto out_unlocked; } rtnl_lock(); @@ -1939,6 +1939,7 @@ static int talk_to_netback(struct xenbus_device *dev, xennet_destroy_queues(info); out: rtnl_unlock(); +out_unlocked: device_unregister(&dev->dev); return err; } -- 2.17.1