From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A55F1A09E9 for ; Tue, 8 Dec 2020 21:12:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 268AEC9AA; Tue, 8 Dec 2020 21:11:51 +0100 (CET) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 535EFC96E for ; Tue, 8 Dec 2020 21:11:46 +0100 (CET) Received: by mail-pg1-f195.google.com with SMTP id f17so13190940pge.6 for ; Tue, 08 Dec 2020 12:11:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=0ZNEkWyNweQWeS4EVNMH7bgSwF+DcEj7KsmQXdJi1Xo=; b=dWKv//uGtvDqpXARYFuTHCONk/ofIDu/nPS/IJeU61sRC+HJfckI2RJP+/UJLh6s3q LPAlvDPLN6FecaMROO0VXbt2wsUI376hhpAy7Z9vc2r9/9nj91g3Rsvo97m6BJOwnHtI c8ZqXwPOzg9HAjgQXjSNdJAY0PMdvMR9E30Sw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=0ZNEkWyNweQWeS4EVNMH7bgSwF+DcEj7KsmQXdJi1Xo=; b=CvIVc0d9ODdDt7sUElwNtBlLkXvegzN09LHY1U5WYOeAXfxxclhLLlTQrSVWsSRbIg YlKcoohrBywf+lgioMLf004HU2fEbGrUMS3YobZDgZf1+/aWkQt/i231quSJvMzNaF3L yawjSA16CV7uV1+1la+xcLmet4OrJ7z3GgmtP4id4gHWsv7kOA7Gy/JAhkHbfal1XaRi 9u+iNCdBo8ze4kKHLTKSx6yQ+u2I7BLFs58wE/olD/aWmi4jyMQgxxwKe8lLyktEx4eG xwyhNd0Z8ighEi3QRuaVDU8tVmj0bZVFwgPSuI5w7wRIsZot2g6WslojlhZPM/GxOPPt Q+6A== X-Gm-Message-State: AOAM531d4Grrh3WyVoG5ksSOM6lTFuCnbOPCkilGF3hB1TDe9loaiTwj KMQIolGqRS0rwVCbb+OtP1e/UV1l2Cu/jF5kuHH1xKc35h0GP3pJwnPJEc0PmqMuYhRVomQLWg= = X-Google-Smtp-Source: ABdhPJysnh5hAm9OQ0ZLRVsuMN/R6S+808S98x1qjJCS8Yx2ivhxJSx2pFNx2Aa89JXGNfNnE6jlZw== X-Received: by 2002:aa7:963c:0:b029:19d:dcd3:b2ae with SMTP id r28-20020aa7963c0000b029019ddcd3b2aemr14021806pfg.76.1607458304496; Tue, 08 Dec 2020 12:11:44 -0800 (PST) Received: from localhost.localdomain ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x10sm5729187pfc.157.2020.12.08.12.11.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2020 12:11:43 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: Kalesh AP , stable@dpdk.org, Somnath Kotur Date: Tue, 8 Dec 2020 12:11:21 -0800 Message-Id: <20201208201134.47844-5-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201208201134.47844-1-ajit.khaparde@broadcom.com> References: <20201208201134.47844-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-stable] [PATCH 04/17] net/bnxt: release hwrm lock in the error case X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Kalesh AP In __bnxt_hwrm_func_qcaps, when memory allocations fails driver is not releasing the hwrm lock. This patch fixes it by calling hwrm_unlock in that error case. Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index ebbf504c0..784e9778a 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -718,6 +718,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0); if (bp->pf->vf_info == NULL) { PMD_DRV_LOG(ERR, "Alloc vf info fail\n"); + HWRM_UNLOCK(); return -ENOMEM; } bp->pf->max_vfs = new_max_vfs; -- 2.21.1 (Apple Git-122.3) -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.