From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1941AA034F; Mon, 11 Oct 2021 16:52:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9BA6411AD; Mon, 11 Oct 2021 16:50:04 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 19CEB41196; Mon, 11 Oct 2021 16:50:00 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id D9ED37F702; Mon, 11 Oct 2021 17:49:59 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id CE1F27F712; Mon, 11 Oct 2021 17:49:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru CE1F27F712 Authentication-Results: shelob.oktetlabs.ru/CE1F27F712; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Viacheslav Galaktionov , stable@dpdk.org, Andy Moreton Date: Mon, 11 Oct 2021 17:48:46 +0300 Message-Id: <20211011144857.446802-28-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> References: <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 27/38] net/sfc: free MAE lock once switch domain is assigned X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Viacheslav Galaktionov If for some reason the hardware switch ID initialization function fails, MAE lock is still held after the function finishes. This patch fixes that. Fixes: 1e7fbdf0ba19 ("net/sfc: support concept of switch domains/ports") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c index c37cdf4a61..80c884a599 100644 --- a/drivers/net/sfc/sfc_switch.c +++ b/drivers/net/sfc/sfc_switch.c @@ -214,9 +214,9 @@ sfc_mae_assign_switch_domain(struct sfc_adapter *sa, fail_mem_alloc: sfc_hw_switch_id_fini(sa, hw_switch_id); - rte_spinlock_unlock(&sfc_mae_switch.lock); fail_hw_switch_id_init: + rte_spinlock_unlock(&sfc_mae_switch.lock); return rc; } -- 2.30.2