[dpdk-stable] patch 'net/mlx5: fix leak on Rx queue creation failure' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:11 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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/07/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5c53bc1ac215b01ee2d3e12f05d96f218c1d74b9

Thanks.

Luca Boccassi

---
>From 5c53bc1ac215b01ee2d3e12f05d96f218c1d74b9 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at nvidia.com>
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 <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 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 4d788788e1..e4cbe6430b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1691,6 +1691,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);
 	mlx5_free(tmpl);
 	return NULL;
 }
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.104955540 +0000
+++ 0085-net-mlx5-fix-leak-on-Rx-queue-creation-failure.patch	2021-02-05 11:18:28.930693473 +0000
@@ -1 +1 @@
-From e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d Mon Sep 17 00:00:00 2001
+From 5c53bc1ac215b01ee2d3e12f05d96f218c1d74b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e28e6c63a99d67929dedd9e4cdaeaa6d9a9a995d ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index df08f977bf..787b2b74dd 100644
+index 4d788788e1..e4cbe6430b 100644
@@ -27 +28 @@
-@@ -1620,6 +1620,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1691,6 +1691,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,


More information about the stable mailing list