patch 'raw/ntb: fix double free of Rx mbufs on stop' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:06:02 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/0da34be358eacda1a6613f790c25c75784cf4db4
Thanks.
Kevin
---
>From 0da34be358eacda1a6613f790c25c75784cf4db4 Mon Sep 17 00:00:00 2001
From: Raghavendra Ningoji <raghavendra.ningoji at amd.com>
Date: Wed, 11 Nov 2026 12:36:43 +0530
Subject: [PATCH] raw/ntb: fix double free of Rx mbufs on stop
[ upstream commit 5565de9f6bf7bfd713ea4465583908a22b348e17 ]
Once an Rx mbuf is handed to the application, its software ring entry
still references it until the slot is refilled. On device stop, all
referenced mbufs are freed, including the one now owned by the
application.
Clear the ring entry when the mbuf is taken.
Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions")
Signed-off-by: Raghavendra Ningoji <raghavendra.ningoji at amd.com>
---
drivers/raw/ntb/ntb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 1a747f27fc..c228a8e2c0 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -831,4 +831,5 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,
rx_item = rxq->rx_used_ring + rxq->last_used;
rxm_t = sw_ring[rxq->last_used].mbuf;
+ sw_ring[rxq->last_used].mbuf = NULL;
rxm_t->data_len = rx_item->len;
rxm_t->data_off = RTE_PKTMBUF_HEADROOM;
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:51.522503654 +0000
+++ 0436-raw-ntb-fix-double-free-of-Rx-mbufs-on-stop.patch 2026-12-03 12:52:39.335476920 +0000
@@ -1 +1 @@
-From 5565de9f6bf7bfd713ea4465583908a22b348e17 Mon Sep 17 00:00:00 2001
+From 0da34be358eacda1a6613f790c25c75784cf4db4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5565de9f6bf7bfd713ea4465583908a22b348e17 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 11303bb2bb..66f6dac5c4 100644
+index 1a747f27fc..c228a8e2c0 100644
@@ -25 +26 @@
-@@ -695,4 +695,5 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,
+@@ -831,4 +831,5 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,
More information about the stable
mailing list