patch 'raw/ntb: fix double free of Rx mbufs on stop' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 16 23:52:25 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d6f9b2f8e826fa57677a6f63544d0937d98e3ca7

Thanks.

Luca Boccassi

---
>From d6f9b2f8e826fa57677a6f63544d0937d98e3ca7 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 7d38bbca95..74d189149c 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -830,6 +830,7 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,
 		for (i = 0; i < nb_segs; i++) {
 			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;
 			rxm_t->port = rxq->port_id;
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-16 22:52:19.311785371 +0000
+++ 0071-raw-ntb-fix-double-free-of-Rx-mbufs-on-stop.patch	2026-11-16 22:52:16.536234756 +0000
@@ -1 +1 @@
-From 5565de9f6bf7bfd713ea4465583908a22b348e17 Mon Sep 17 00:00:00 2001
+From d6f9b2f8e826fa57677a6f63544d0937d98e3ca7 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 7d38bbca95..74d189149c 100644
@@ -25 +26 @@
-@@ -694,6 +694,7 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,
+@@ -830,6 +830,7 @@ ntb_dequeue_bufs(struct rte_rawdev *dev,


More information about the stable mailing list