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 AF9BF48B69 for ; Fri, 21 Nov 2025 12:24:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A950F402ED; Fri, 21 Nov 2025 12:24: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 75E594026F for ; Fri, 21 Nov 2025 12:24:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724241; 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=biIKUHxBJA3xAmADnzdWGTlY9SSrnm0x4FvCNGH8PaA=; b=MPGSUBwRScVVwsE9RHfuFzesr0XE+Zuf9TrFbITpv3HooabzD9mco/BAcwSJod43nrILiB 7oDvc2GmuYfg9d3CwIaTy5u2EmrKOb6Lk5xEUNTNTTsFBrvu4o0ksoVYOUES70hO9TfNu8 2gUXTXV1XBilWJ9YQDW2vjqpWhsHCjU= Received: from mx-prod-mc-01.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-587-yRSGri6zPfyz40n89BkV2Q-1; Fri, 21 Nov 2025 06:23:57 -0500 X-MC-Unique: yRSGri6zPfyz40n89BkV2Q-1 X-Mimecast-MFC-AGG-ID: yRSGri6zPfyz40n89BkV2Q_1763724236 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E4A581954B1B; Fri, 21 Nov 2025 11:23:55 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5BCDD30044DB; Fri, 21 Nov 2025 11:23:54 +0000 (UTC) From: Kevin Traynor To: Hemant Agrawal Cc: Maxime Leroy , dpdk stable Subject: patch 'net/dpaa2: fix duplicate call of close' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:20:50 +0000 Message-ID: <20251121112128.485623-66-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: II9t3sU2eY533-E2EmPxOenYTg4TdO-L4uAUMV2d780_1763724236 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/26/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/918721461c64ff52b9e6b2e1451fbaaa61650c27 Thanks. Kevin --- >From 918721461c64ff52b9e6b2e1451fbaaa61650c27 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Fri, 14 Nov 2025 11:54:51 +0530 Subject: [PATCH] net/dpaa2: fix duplicate call of close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 3b8225353ea3b9eb03df5dee94a037582d0d6748 ] When rte_eth_dev_close() is called, it performs the following actions: Calls dev->dev_ops->dev_close(), which in this case is dpaa2_dev_close(). Then calls rte_eth_dev_release_port(), which releases all device data and sets dev->data to NULL. Later, when rte_dev_remove() is called, the FSLMC bus invokes dev->remove() — that is, rte_dpaa2_remove(). However, rte_dpaa2_remove() calls dpaa2_dev_close() again. Since dev->data was already set to NULL by the previous call, this second invocation causes a crash. Fixes: 5964d36a2904 ("net/dpaa2: release port upon close") Signed-off-by: Hemant Agrawal Tested-by: Maxime Leroy --- drivers/net/dpaa2/dpaa2_ethdev.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 722bb6fa8e..c9dc0fbdf0 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -3056,12 +3056,20 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev) { struct rte_eth_dev *eth_dev; - int ret; + int ret = 0; + + eth_dev = rte_eth_dev_allocated(dpaa2_dev->device.name); + if (eth_dev) { + ret = dpaa2_dev_close(eth_dev); + if (ret) + DPAA2_PMD_ERR("dpaa2_dev_close ret= %d", ret); + + ret = rte_eth_dev_release_port(eth_dev); + } - eth_dev = dpaa2_dev->eth_dev; - dpaa2_dev_close(eth_dev); dpaa2_valid_dev--; - if (!dpaa2_valid_dev) + if (!dpaa2_valid_dev) { rte_mempool_free(dpaa2_tx_sg_pool); - ret = rte_eth_dev_release_port(eth_dev); + dpaa2_tx_sg_pool = NULL; + } return ret; -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.645575378 +0000 +++ 0066-net-dpaa2-fix-duplicate-call-of-close.patch 2025-11-21 11:05:09.542201506 +0000 @@ -1 +1 @@ -From 3b8225353ea3b9eb03df5dee94a037582d0d6748 Mon Sep 17 00:00:00 2001 +From 918721461c64ff52b9e6b2e1451fbaaa61650c27 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 3b8225353ea3b9eb03df5dee94a037582d0d6748 ] + @@ -22 +23,0 @@ -Cc: stable@dpdk.org @@ -31 +32 @@ -index 7da32ce856..fcda267e0b 100644 +index 722bb6fa8e..c9dc0fbdf0 100644 @@ -34 +35 @@ -@@ -3348,12 +3348,20 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev) +@@ -3056,12 +3056,20 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev)