patch 'net/af_packet: fix crash in secondary process' has been queued to stable release 24.11.4
Kevin Traynor
ktraynor at redhat.com
Fri Oct 31 15:33:37 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.4
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/05/25. 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/c55c49157434d006eeaea92ed92e472efef067b0
Thanks.
Kevin
---
>From c55c49157434d006eeaea92ed92e472efef067b0 Mon Sep 17 00:00:00 2001
From: Kerem Aksu <kerem.aksu at i2i-systems.com>
Date: Fri, 12 Sep 2025 14:35:25 +0300
Subject: [PATCH] net/af_packet: fix crash in secondary process
[ upstream commit d57124f60ef60b24cd39e895cf6d211b93b897ae ]
dumpcap crashes when trying to capture from af_packet devices. This is
caused by allocating interface name with
strdup (i.e. malloc). Interface name is not accessible from secondary
process and causes segmentation fault. Use rte_malloc instead of
strdup to fix the issue.
Bugzilla ID: 1786
Fixes: 1b93c2aa81b4 ("net/af_packet: add interface name to internals")
Signed-off-by: Kerem Aksu <kerem.aksu at i2i-systems.com>
---
.mailmap | 1 +
drivers/net/af_packet/rte_eth_af_packet.c | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 5e3d447103..de8893d104 100644
--- a/.mailmap
+++ b/.mailmap
@@ -803,4 +803,5 @@ Keiichi Watanabe <keiichiw at chromium.org>
Keith Wiles <keith.wiles at intel.com> <keith.wiles at windriver.com>
Kent Wires <kent.wires at intel.com>
+Kerem Aksu <kerem.aksu at i2i-systems.com>
Keunhong Lee <dlrmsghd at gmail.com>
Kevin Laatz <kevin.laatz at intel.com>
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index efae15a493..0ad199bbd2 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -490,5 +490,5 @@ eth_dev_close(struct rte_eth_dev *dev)
rte_free(internals->tx_queue[q].rd);
}
- free(internals->if_name);
+ rte_free(internals->if_name);
rte_free(internals->rx_queue);
rte_free(internals->tx_queue);
@@ -794,7 +794,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
goto free_internals;
}
- (*internals)->if_name = strdup(pair->value);
+ (*internals)->if_name = rte_malloc_socket(name, ifnamelen + 1, 0, numa_node);
if ((*internals)->if_name == NULL)
goto free_internals;
+ strlcpy((*internals)->if_name, pair->value, ifnamelen + 1);
(*internals)->if_index = ifr.ifr_ifindex;
@@ -983,5 +984,5 @@ free_internals:
rte_free((*internals)->rx_queue);
rte_free((*internals)->tx_queue);
- free((*internals)->if_name);
+ rte_free((*internals)->if_name);
rte_free(*internals);
return -1;
--
2.51.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-10-31 13:53:55.136435766 +0000
+++ 0095-net-af_packet-fix-crash-in-secondary-process.patch 2025-10-31 13:53:52.271524102 +0000
@@ -1 +1 @@
-From d57124f60ef60b24cd39e895cf6d211b93b897ae Mon Sep 17 00:00:00 2001
+From c55c49157434d006eeaea92ed92e472efef067b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d57124f60ef60b24cd39e895cf6d211b93b897ae ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index ff13bf09fb..ff873856cb 100644
+index 5e3d447103..de8893d104 100644
@@ -26 +27 @@
-@@ -831,4 +831,5 @@ Keiichi Watanabe <keiichiw at chromium.org>
+@@ -803,4 +803,5 @@ Keiichi Watanabe <keiichiw at chromium.org>
@@ -33 +34 @@
-index 85bc1201b4..de7ff63527 100644
+index efae15a493..0ad199bbd2 100644
@@ -36 +37 @@
-@@ -526,5 +526,5 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -490,5 +490,5 @@ eth_dev_close(struct rte_eth_dev *dev)
@@ -43 +44 @@
-@@ -876,7 +876,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
+@@ -794,7 +794,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
@@ -53 +54 @@
-@@ -1064,5 +1065,5 @@ free_internals:
+@@ -983,5 +984,5 @@ free_internals:
More information about the stable
mailing list