Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2276632pxb; Mon, 11 Jan 2021 05:51:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzh/6ZnuTVhmIrHpGSivnP+5XueMt0FQEatzSqr0tHHqx2eiTmlatGIjIURKVp85MzTxOhX X-Received: by 2002:a17:906:878d:: with SMTP id za13mr10755131ejb.395.1610373092601; Mon, 11 Jan 2021 05:51:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610373092; cv=none; d=google.com; s=arc-20160816; b=RODWP8aIlCSByngY4eTU6ZTyTL7k+KEitkXI7rmtNe4lD3NKZTWqyCIyFhGjBR55yS oElwTEdQwdpkBwbHek+4tdHiMtYjisOERgwbyr06z7tTZ3ZHLSpuGotGSOOjP5NywHsI kBPK+ZD8LG789L6/nE8/KHofRVA6/voGHdD8Essf0FF62HN6pyZuLg8DYDp8fXi68blE 9Ull1bURdjZtLTO/eKH/ErFxaK22IRrWgdLNge64+Cy315p+XfXpEJ/scuZSyQy5U2Mi JrFGjnG65amvD5LPjdr4DT/kld/cePVkSvmYlW9yinZFWe8tbR4bihBC8sQisoyGlU12 po6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pSRpCZLGpkqPNGyYgQl/4cxVe6BTTJW42igLTrMh0Og=; b=d87WpITMmKOqt0i10vB4TOvgrkyFwGvP8e//ZvOWnAuJzXYF6WQrVsZLsb/OhIfg1f wjIKOoEGjKmpknmxy0sNow/EAT43qbpRH6W74LVuY3QaB1fdQjaqR5pt80vwCfWxYmFD lt4Ei/OHWMz+I3aWkz5KNgnqusenjs1JJEht994/Ju2JL14IQh7RnP9o1laXOHEw8rDq Oa6QQPsSlWwce1LnyqHgsJxwtPEGrcRTkteWmmGvQZgTuaeOkHk5Znclex7ko6LHnxNl 7sAx7SBn3YM/oIndIeaGNHCX3mRRuTKb3xhEzCW2NEcruin7kIyVRoEBI13WF5gHTEmi IxHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wH0GZYMU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b24si2226369eja.598.2021.01.11.05.51.08; Mon, 11 Jan 2021 05:51:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wH0GZYMU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731278AbhAKNtG (ORCPT + 99 others); Mon, 11 Jan 2021 08:49:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:57080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731105AbhAKNKE (ORCPT ); Mon, 11 Jan 2021 08:10:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 356D62250F; Mon, 11 Jan 2021 13:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370588; bh=SFdCxK+xwbydU7AWWzGIYYkfI9DiNJX2c/s24L5vk64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wH0GZYMUkHW63pC76JzVd4eq0tdFv/UlTshTZ5frjg5Kdzl5MU4HdipksMaCdsGlx kLjDoa97qcONzkkGEoe4scjSmKL1IeypbBKvyaYXh3GTbjRZHNqTlBlGx3bzvhq1zi qhGmFDSzMZgs59MrYKZVrFiuv5dudeRHyIKhxE/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , Tony Nguyen , Konrad Jankowski Subject: [PATCH 5.4 11/92] iavf: fix double-release of rtnl_lock Date: Mon, 11 Jan 2021 14:01:15 +0100 Message-Id: <20210111130039.703655025@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130039.165470698@linuxfoundation.org> References: <20210111130039.165470698@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit f1340265726e0edf8a8cef28e665b28ad6302ce9 ] This code does not jump to exit on an error in iavf_lan_add_device(), so the rtnl_unlock() from the normal path will follow. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Jakub Kicinski Reviewed-by: Tony Nguyen Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -1844,11 +1844,9 @@ static int iavf_init_get_resources(struc netif_tx_stop_all_queues(netdev); if (CLIENT_ALLOWED(adapter)) { err = iavf_lan_add_device(adapter); - if (err) { - rtnl_unlock(); + if (err) dev_info(&pdev->dev, "Failed to add VF to client API service list: %d\n", err); - } } dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr); if (netdev->features & NETIF_F_GRO)