Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2024331imm; Thu, 21 Jun 2018 06:08:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLBsNX7Oz7mAP8YIBcTsqep/gncdAJLHuUd+k0zTiX5wg6sBuJESgwl/ZvK8Z0X/+NDO/iL X-Received: by 2002:a63:b95c:: with SMTP id v28-v6mr1180385pgo.162.1529586527000; Thu, 21 Jun 2018 06:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529586526; cv=none; d=google.com; s=arc-20160816; b=By/Rpd2F4LChpBsENzuaW/0sqxLpDJ/La8fTdcnUvhUKgVKz0BnElGCoqiJiMWN75v wk8R01sD0MfPsvpXm1rPygnQn05qC13EC1Rce8zfZsVeWyKYu7Q9UzO9z1gJ59gvIUyK fhHDqig0gXn6qnnd9k48+mnVDbKA4mNgHdANEEvO25kBEvgeCshL1S00/WG5z4JxoPoX Ia8TPJSB1gzdwTSqmRLyzhBHRgbtUsh6aySIFFFoBbdwh2fgq9MQzf8w1dKrzfw3Ly5G OwBTpzE5uNcJgZl1pV74K5JUcFwy4xbvtxUF4UWPlbszi7i0rCCwkbjIo4HQZJ1AKkiW W1YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=YdKudtpePkV3Gpl7mbv5BTioc5ZfF18kP9Ar/dmXGXA=; b=OuzQrGE10sFf8zlMoafJbNYvEBF9yy064pOePYwiLF0m2Q9eS4b5q0qMHCrC/d7JCe a92+9Rj5lwrZqnrl6fZMdh2Xt7cUKObCruC4JLD+T6IRzM1BdOlMa01xGWOltGkbTmU+ 8oMe+80md9QrZ8NaPS8zuPfK5511Q8EjWXS2q5nM7osp1HyA6C9FG96PdQX35Jy5uOG/ U8cfhyXrZjAWcmDlYpOVHFnL8oVHf2WjMAONIGZK3JM8SwaoZQX0sCqRB+j1RK6whzoP Z1D1lmVbqTMs7qesBoLReuwl03Bq4ROy2k9Scetpvut9dgA2SoEvO+1wfJo2cUJPMrnn 7u6A== 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 q1-v6si4724879plb.331.2018.06.21.06.08.32; Thu, 21 Jun 2018 06:08:46 -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; 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 S933569AbeFUNGZ (ORCPT + 99 others); Thu, 21 Jun 2018 09:06:25 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:64675 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933096AbeFUNGX (ORCPT ); Thu, 21 Jun 2018 09:06:23 -0400 X-IronPort-AV: E=Sophos;i="5.51,252,1526342400"; d="scan'208";a="58221534" Subject: Re: [PATCH 4.4 059/268] xen-netfront: Fix race between device setup and open To: Ben Hutchings , Boris Ostrovsky , Juergen Gross CC: , Sasha Levin , Greg Kroah-Hartman , LKML References: <20180528100202.045206534@linuxfoundation.org> <20180528100208.647996715@linuxfoundation.org> <1528727372.2289.120.camel@codethink.co.uk> From: Ross Lagerwall Message-ID: Date: Thu, 21 Jun 2018 14:05:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1528727372.2289.120.camel@codethink.co.uk> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/11/2018 03:29 PM, Ben Hutchings wrote: > On Mon, 2018-05-28 at 12:00 +0200, Greg Kroah-Hartman wrote: >> 4.4-stable review patch.  If anyone has any objections, please let me know. >> >> ------------------ >> >> From: Ross Lagerwall >> >> [ Upstream commit f599c64fdf7d9c108e8717fb04bc41c680120da4 ] > [...] >> --- a/drivers/net/xen-netfront.c >> +++ b/drivers/net/xen-netfront.c > [...] >> @@ -1839,6 +1824,7 @@ static int talk_to_netback(struct xenbus >>   goto out; > > This "goto out" is outside the locked section... > >>   } >> >> + rtnl_lock(); >>   if (info->queues) >>   xennet_destroy_queues(info); >> >> @@ -1849,6 +1835,7 @@ static int talk_to_netback(struct xenbus >>   info->queues = NULL; >>   goto out; >>   } >> + rtnl_unlock(); >> >>   /* Create shared ring, alloc event channel -- for each queue */ >>   for (i = 0; i < num_queues; ++i) { >> @@ -1945,8 +1932,10 @@ abort_transaction_no_dev_fatal: >>   xenbus_transaction_end(xbt, 1); >>   destroy_ring: >>   xennet_disconnect_backend(info); >> + rtnl_lock(); >>   xennet_destroy_queues(info); >>   out: >> + rtnl_unlock(); > > ...so this will be an unmatched unlock. > > You need to add another label below the rtnl_unlock(). > Thanks for spotting this. I've sent patches to the list to fix this and another issue with the original patch. Regards, -- Ross Lagerwall