patch 'net/mlx5: fix memory leak after device spawn failure' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:09:57 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.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 03/02/26. 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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d571708f3ec61c89394692b96b58c7ff2d9e3c68
Thanks.
Kevin
---
>From d571708f3ec61c89394692b96b58c7ff2d9e3c68 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Thu, 18 Dec 2025 18:57:26 +0800
Subject: [PATCH] net/mlx5: fix memory leak after device spawn failure
[ upstream commit 093b145b3af3eb3f2b7a8392b7d720b24e119dd3 ]
In mlx5_dev_spawn() allocated memory for the 'priv->flows',
we should free it when errors occur, otherwise it will lead
to memory leak.
Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool")
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 7f73183bb1..7624b2aba2 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1832,4 +1832,9 @@ error:
if (priv->vmwa_context)
mlx5_vlan_vmwa_exit(priv->vmwa_context);
+ for (i = 0; i < MLX5_FLOW_TYPE_MAXI; i++) {
+ if (!priv->flows[i])
+ continue;
+ mlx5_ipool_destroy(priv->flows[i]);
+ }
if (eth_dev && priv->drop_queue.hrxq)
mlx5_drop_action_destroy(eth_dev);
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:51.561823265 +0000
+++ 0115-net-mlx5-fix-memory-leak-after-device-spawn-failure.patch 2026-02-26 10:16:47.142460072 +0000
@@ -1 +1 @@
-From 093b145b3af3eb3f2b7a8392b7d720b24e119dd3 Mon Sep 17 00:00:00 2001
+From d571708f3ec61c89394692b96b58c7ff2d9e3c68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 093b145b3af3eb3f2b7a8392b7d720b24e119dd3 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list