[dpdk-stable] patch 'net/mlx5: fix leak on ASO SQ 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:39 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/bc316de164b02f7675023aa1d27ac6a0c63ba5ee

Thanks.

Luca Boccassi

---
>From bc316de164b02f7675023aa1d27ac6a0c63ba5ee Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at nvidia.com>
Date: Wed, 6 Jan 2021 08:19:25 +0000
Subject: [PATCH] net/mlx5: fix leak on ASO SQ creation failure

[ upstream commit 0e8273176e60d813a8a905e4ce38bbd18a1e2470 ]

In ASO SQ creation, the PMD allocates umem buffer for SQ.

When umem buffer allocation fails, the MR and CQ memory are not freed
what caused a memory leak.

Free it.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_age.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_age.c b/drivers/net/mlx5/mlx5_flow_age.c
index cea2cf769d..0ea61be4eb 100644
--- a/drivers/net/mlx5/mlx5_flow_age.c
+++ b/drivers/net/mlx5/mlx5_flow_age.c
@@ -278,7 +278,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
 				   sizeof(*sq->db_rec) * 2, 4096, socket);
 	if (!sq->umem_buf) {
 		DRV_LOG(ERR, "Can't allocate wqe buffer.");
-		return -ENOMEM;
+		rte_errno = ENOMEM;
+		goto error;
 	}
 	sq->wqe_umem = mlx5_glue->devx_umem_reg(ctx,
 						(void *)(uintptr_t)sq->umem_buf,
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.294325380 +0000
+++ 0113-net-mlx5-fix-leak-on-ASO-SQ-creation-failure.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 0e8273176e60d813a8a905e4ce38bbd18a1e2470 Mon Sep 17 00:00:00 2001
+From bc316de164b02f7675023aa1d27ac6a0c63ba5ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8273176e60d813a8a905e4ce38bbd18a1e2470 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 1f15f19800..e8676071fc 100644
+index cea2cf769d..0ea61be4eb 100644
@@ -26 +27 @@
-@@ -279,7 +279,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
+@@ -278,7 +278,8 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket,
@@ -34 +35 @@
- 	sq->wqe_umem = mlx5_os_umem_reg(ctx,
+ 	sq->wqe_umem = mlx5_glue->devx_umem_reg(ctx,


More information about the stable mailing list