From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C09048A44 for ; Fri, 31 Oct 2025 15:39:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14A0F40150; Fri, 31 Oct 2025 15:39:03 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 3377240695 for ; Fri, 31 Oct 2025 15:39:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2yhJzQ0bZcHsrqeNTsuz9a1+DzT9bxP2/LRveC35DUs=; b=BYIvUAb6X6vo/etsfLWxoldRva1BdFJTvueQYvVPQ1fn54RTHFhLKexdekR7HoghtD/XcA b4tZxsCbO4ML35LPqB4CCwiVOBQ7fMuiRKEu66JjAEnvKsDcyfyBOGc8hRdDlgT44L8KbD u4wkvoFNzPoxaxKsCkwKdckcwfDeHMY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-eh8sgSMCPTehGXJjJ0K2pg-1; Fri, 31 Oct 2025 10:38:57 -0400 X-MC-Unique: eh8sgSMCPTehGXJjJ0K2pg-1 X-Mimecast-MFC-AGG-ID: eh8sgSMCPTehGXJjJ0K2pg_1761921537 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C9749195606B; Fri, 31 Oct 2025 14:38:56 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 84673180044F; Fri, 31 Oct 2025 14:38:55 +0000 (UTC) From: Kevin Traynor To: Kerem Aksu Cc: dpdk stable Subject: patch 'net/af_packet: fix crash in secondary process' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:33:37 +0000 Message-ID: <20251031143421.324432-95-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: LTpuMYBXxAmxRjXGPL6fjHNYNNa6o2QDsDXUkkN-JDI_1761921537 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 --- .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 Keith Wiles Kent Wires +Kerem Aksu Keunhong Lee Kevin Laatz 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@dpdk.org @@ -23 +24 @@ -index ff13bf09fb..ff873856cb 100644 +index 5e3d447103..de8893d104 100644 @@ -26 +27 @@ -@@ -831,4 +831,5 @@ Keiichi Watanabe +@@ -803,4 +803,5 @@ Keiichi Watanabe @@ -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: