patch 'net/mana: fix double free of mbuf on Rx WQE post failure' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 13:59:03 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/7fe89a8b03ab9f965d0770df6f7688e4f92ceb5a

Thanks.

Kevin

---
>From 7fe89a8b03ab9f965d0770df6f7688e4f92ceb5a Mon Sep 17 00:00:00 2001
From: Rita Ruvinsky <rita.ruvinsky at weka.io>
Date: Thu, 6 Aug 2026 20:26:40 +0300
Subject: [PATCH] net/mana: fix double free of mbuf on Rx WQE post failure

[ upstream commit 01597534a61c9a82f09010326e8e13cebde8d7e3 ]

mana_post_rx_wqe() frees the mbuf when mana_alloc_pmd_mr() fails, but
the caller already frees the un-posted range starting at that same
mbuf via rte_pktmbuf_free_bulk(&mbufs[i], batch_count - i), so the
mbuf is returned to the mempool twice and can be handed out to two
consumers at once.

The free was correct before the bulk allocation rework, when this
function allocated the mbuf itself. Now that the caller owns it, leave
the mbuf to the caller on every error path.

Fixes: eeb37809601b ("net/mana: use bulk mbuf allocation for Rx WQEs")

Signed-off-by: Rita Ruvinsky <rita.ruvinsky at weka.io>
Reviewed-by: Long Li <longli at microsoft.com>
---
 drivers/net/mana/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 1b8ba1f3a9..9782dd4116 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -69,8 +69,8 @@ mana_post_rx_wqe(struct mana_rxq *rxq, struct rte_mbuf *mbuf)
 	struct mana_mr_cache *mr;
 
+	/* Don't free mbuf on error: the caller bulk-frees it from &mbufs[i]. */
 	mr = mana_alloc_pmd_mr(&rxq->mr_btree, priv, mbuf);
 	if (!mr) {
 		DP_LOG(ERR, "failed to register RX MR");
-		rte_pktmbuf_free(mbuf);
 		return -ENOMEM;
 	}
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:39.842561851 +0000
+++ 0017-net-mana-fix-double-free-of-mbuf-on-Rx-WQE-post-fail.patch	2026-12-03 12:52:39.026198522 +0000
@@ -1 +1 @@
-From 01597534a61c9a82f09010326e8e13cebde8d7e3 Mon Sep 17 00:00:00 2001
+From 7fe89a8b03ab9f965d0770df6f7688e4f92ceb5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01597534a61c9a82f09010326e8e13cebde8d7e3 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index aedb05d46f..274c6e88ce 100644
+index 1b8ba1f3a9..9782dd4116 100644
@@ -29 +30 @@
-@@ -74,8 +74,8 @@ mana_post_rx_wqe(struct mana_rxq *rxq, struct rte_mbuf *mbuf)
+@@ -69,8 +69,8 @@ mana_post_rx_wqe(struct mana_rxq *rxq, struct rte_mbuf *mbuf)



More information about the stable mailing list