patch 'ip_frag: fix unsafe tailq usage' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:15:31 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.11.3

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

Thanks.

Kevin

---
>From caf524d6653fab23b369d5314b4a8181b18b986e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 8 Apr 2026 09:16:16 -0700
Subject: [PATCH] ip_frag: fix unsafe tailq usage

[ upstream commit fa6adb457d9f377947719f8d1beaec3347a5e98b ]

The frag table next pointer was being access after TAILQ_REMOVE().
This is not safe since it depends on TAILQ_REMOVE() not changing
next pointer. Fix by using RTE_TAILQ_FOREACH_SAFE().

Fixes: 95908f52393d ("ip_frag: free mbufs on reassembly table destroy")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 lib/ip_frag/ip_frag_common.h     |  1 +
 lib/ip_frag/rte_ip_frag_common.c | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h
index 51fc9d47fb..34be5bb6ab 100644
--- a/lib/ip_frag/ip_frag_common.h
+++ b/lib/ip_frag/ip_frag_common.h
@@ -9,4 +9,5 @@
 
 #include <rte_common.h>
+#include <rte_tailq.h>
 
 #if defined(RTE_ARCH_ARM64)
diff --git a/lib/ip_frag/rte_ip_frag_common.c b/lib/ip_frag/rte_ip_frag_common.c
index ee9aa93027..79ac45289b 100644
--- a/lib/ip_frag/rte_ip_frag_common.c
+++ b/lib/ip_frag/rte_ip_frag_common.c
@@ -136,17 +136,17 @@ rte_ip_frag_table_del_expired_entries(struct rte_ip_frag_tbl *tbl,
 {
 	uint64_t max_cycles;
-	struct ip_frag_pkt *fp;
+	struct ip_frag_pkt *fp, *tmp;
 
 	max_cycles = tbl->max_cycles;
 
-	TAILQ_FOREACH(fp, &tbl->lru, lru)
-		if (max_cycles + fp->start < tms) {
-			/* check that death row has enough space */
-			if (RTE_IP_FRAG_DEATH_ROW_MBUF_LEN - dr->cnt >=
-					fp->last_idx)
-				ip_frag_tbl_del(tbl, dr, fp);
-			else
-				return;
-		} else
+	RTE_TAILQ_FOREACH_SAFE(fp, &tbl->lru, lru, tmp) {
+		if (max_cycles + fp->start >= tms)
 			return;
+
+		/* check that death row has enough space */
+		if (RTE_IP_FRAG_DEATH_ROW_MBUF_LEN - dr->cnt < fp->last_idx)
+			return;
+
+		ip_frag_tbl_del(tbl, dr, fp);
+	}
 }
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:58:00.617950892 +0100
+++ 0068-ip_frag-fix-unsafe-tailq-usage.patch	2026-07-23 17:57:58.686726987 +0100
@@ -1 +1 @@
-From fa6adb457d9f377947719f8d1beaec3347a5e98b Mon Sep 17 00:00:00 2001
+From caf524d6653fab23b369d5314b4a8181b18b986e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa6adb457d9f377947719f8d1beaec3347a5e98b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list