patch 'net/mana: fix PD resource leak on device close' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:02:52 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/23/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/365fd2dec19f687d550308568e4f1a8cb2763a3a

Thanks.

Kevin

---
>From 365fd2dec19f687d550308568e4f1a8cb2763a3a Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Thu, 26 Feb 2026 17:59:23 -0800
Subject: [PATCH] net/mana: fix PD resource leak on device close

[ upstream commit 5906f9b6abf4318c9464db4438e85e0507f6a0cb ]

The Protection Domains (PDs) allocated during device initialization
were not being deallocated on device close, causing a resource leak.

Deallocate both ib_parent_pd and ib_pd in mana_dev_close() before
closing the IB device context. Log errors if deallocation fails,
which would indicate orphaned child resources (QPs, MRs). The close
proceeds regardless because ibv_close_device() will force kernel
cleanup of any remaining resources.

Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")

Signed-off-by: Long Li <longli at microsoft.com>
---
 drivers/net/mana/mana.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index b7ae01b152..67396cda1f 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -283,4 +283,18 @@ mana_dev_close(struct rte_eth_dev *dev)
 		return ret;
 
+	if (priv->ib_parent_pd) {
+		int err = ibv_dealloc_pd(priv->ib_parent_pd);
+		if (err)
+			DRV_LOG(ERR, "Failed to deallocate parent PD: %d", err);
+		priv->ib_parent_pd = NULL;
+	}
+
+	if (priv->ib_pd) {
+		int err = ibv_dealloc_pd(priv->ib_pd);
+		if (err)
+			DRV_LOG(ERR, "Failed to deallocate PD: %d", err);
+		priv->ib_pd = NULL;
+	}
+
 	ret = ibv_close_device(priv->ib_ctx);
 	if (ret) {
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:08.687642117 +0000
+++ 0054-net-mana-fix-PD-resource-leak-on-device-close.patch	2026-03-19 10:01:07.120910985 +0000
@@ -1 +1 @@
-From 5906f9b6abf4318c9464db4438e85e0507f6a0cb Mon Sep 17 00:00:00 2001
+From 365fd2dec19f687d550308568e4f1a8cb2763a3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5906f9b6abf4318c9464db4438e85e0507f6a0cb ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list