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 12460A0524 for ; Thu, 4 Feb 2021 12:38:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B4DD24077B; Thu, 4 Feb 2021 12:38:33 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id A25A5240773 for ; Thu, 4 Feb 2021 12:38:31 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cxz-0005kS-Ef; Thu, 04 Feb 2021 11:38:31 +0000 From: Christian Ehrhardt To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Thu, 4 Feb 2021 12:29:41 +0100 Message-Id: <20210204112954.2488123-126-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' has been queued to stable release 19.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" Hi, FYI, your patch has been queued to stable release 19.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/06/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/0d3dd1559d86733557582c391439b8f4f7510ff9 Thanks. Christian Ehrhardt --- >From 0d3dd1559d86733557582c391439b8f4f7510ff9 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Tue, 15 Dec 2020 08:48:31 +0000 Subject: [PATCH] net/mlx5: fix leak on Rx queue creation failure [ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ] In Rx queue creation, there are some validations for the Rx configuration. When one of them fails, the MR btree memory was not freed what caused a memory leak. Free it. Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 104687db39..e3f41d121d 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1982,6 +1982,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next); return tmpl; error: + mlx5_mr_btree_free(&tmpl->rxq.mr_ctrl.cache_bh); rte_free(tmpl); return NULL; } -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-04 12:04:33.166494383 +0100 +++ 0126-net-mlx5-fix-leak-on-Rx-queue-creation-failure.patch 2021-02-04 12:04:28.190789883 +0100 @@ -1 +1 @@ -From e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d Mon Sep 17 00:00:00 2001 +From 0d3dd1559d86733557582c391439b8f4f7510ff9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index df08f977bf..787b2b74dd 100644 +index 104687db39..e3f41d121d 100644 @@ -27 +28 @@ -@@ -1620,6 +1620,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, +@@ -1982,6 +1982,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, @@ -32 +33 @@ - mlx5_free(tmpl); + rte_free(tmpl);