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 4776748B59 for ; Thu, 20 Nov 2025 13:45:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4133B40262; Thu, 20 Nov 2025 13:45:20 +0100 (CET) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id DB83340289 for ; Thu, 20 Nov 2025 13:45:18 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso9553845e9.3 for ; Thu, 20 Nov 2025 04:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763642718; x=1764247518; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M17uqVYXC36uNeh2T8xvRi1tpIaQPwCE9VDJ8+K87Sw=; b=STw06JXQw7O5j5TD4SlYnInW9Y0NxyyloxvQUH53JRZFSbbqVbWq8jxXAW2pExKl5M 9B+dYqFaQyjdH/7uiViN/7L8VrVvLaqk3MZNwqWz796W4ai+4OhWFCoXVjNW+SFRbLlG P6XxKcDvYotV7tWoXKbR+AqwT1Og/YmclU6RkL9Week19pu+SmmUOMLFNjjvo2/dFVec 6niCznU/2q5iy3u8HyoHgkRaJn3E7LS5lLY0eIRX0RXT6VuyI7GlPBTL4tqm3uShzVIM SANuwClQ8tzWcz5JNSX9cDFoQo+YGbw45hQM37kPypfBNbf7sqgewTh/IgSaX6nd+Xe8 gx8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763642718; x=1764247518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=M17uqVYXC36uNeh2T8xvRi1tpIaQPwCE9VDJ8+K87Sw=; b=RsKp4sjN7ty8XKfS/f1TxQbnsRg0ZU+L9e1jw70ZZUt7G9pQhO2dK+VwHWCpCnnNWf MG0NWiln0V0phRpdL5VMJMnZ7AISlqSMe7U0VbcTIljl3OMfW8ES2EFta10Uv6qL1GFZ 0Ji/h9FdTVchtc/FZw005WkjNVZEoSIMOgJtYXjof0BEcJ9/ei9UlfMGECvY9nU/6UlH 3uzQ08bOnemSFtPjsRAr4iAhQzSuIhEoTfAAHrj52PJorzjCMOi0Cx7Rpr28seb3IP9d ikjpI1Owom+s9LxDVXv4WcgpuPeGB/VM34ttCIMG5NvzhZkQ4gXYdxHblP3di3ntuBME MwBg== X-Forwarded-Encrypted: i=1; AJvYcCXLOTlMMTvh5Q0AFbS47/z6+iLiKNVf/wpoSijRhamS8+7GGpkius2zfVD9S2p6/3AJnpH/TKo=@dpdk.org X-Gm-Message-State: AOJu0YxPhY3AKfOwruQgnFU0tnxc4XLsZihZxyeuHlJKfR0AxwhmEI00 OTebda+VXKVPdx1y/ORSoF8Vg+gdju8PFzCllY5MY/604bAxs0VOUVH5 X-Gm-Gg: ASbGncsY+7JlWQu2P4BU9q+fPa1qWPdn+aZdL2+bu3LVVRoGmJBDoh7h2yF0UEX/oVk L+cjJr1OnNQvRbd6e+dSKHIMW1Fa8qd6l4guLHLqsOhBnOymJLagV9oOyRytxrZmtYHPWg2pKYC zUZ37dXfddC7dAhANofXOr4pN/Y1/4vC7kLH8RPo17SjGB0WfZ1YMzlG3LjjSpozNv81lcc14f9 u0AqtC/tmogyEJlagatQHyhDEhZrZiOJei8Dv3gPmK48IEok+xAaZuxFZuO3Kumhk02CHW5OB0r du+PXMLrT2WeOdG/DmYqUrwuT82d7llpdqrR0ks7l24Q34kf2iCWr2A1WOSZHvHXcjb7QGMsdu+ vVkd4CbdnYKVAhjvzKvi0IkwgEDMZqJjehLJrbLIhdV0nmMzKKUYM8D3BZJSzH+FuAP164nD+7O 0wrISmE7AY9rfYUZhDYtIQxD83zhE= X-Google-Smtp-Source: AGHT+IHn8F2uVcA57MX9nXBrLvZOpVcRNWS0q8WEu54GEePCWKtVSmtScW1T/eV0b7N1PIArcdg6dw== X-Received: by 2002:a05:600c:4f51:b0:477:63b5:6f39 with SMTP id 5b1f17b1804b1-477b8a845femr7282345e9.19.1763642718241; Thu, 20 Nov 2025 04:45:18 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f372:8d1a:399f:e8a2]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-477b106b03bsm108442055e9.9.2025.11.20.04.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 04:45:17 -0800 (PST) From: luca.boccassi@gmail.com To: Hemant Agrawal Cc: Maxime Leroy , dpdk stable Subject: patch 'net/dpaa2: fix duplicate call of close' has been queued to stable release 22.11.11 Date: Thu, 20 Nov 2025 12:44:34 +0000 Message-ID: <20251120124514.757933-2-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251120124514.757933-1-luca.boccassi@gmail.com> References: <20251112165308.1618107-49-luca.boccassi@gmail.com> <20251120124514.757933-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 22.11.11 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/22/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/883e6017cbc409d696b63aad17a6e972b01785ad Thanks. Luca Boccassi --- >From 883e6017cbc409d696b63aad17a6e972b01785ad 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 1f3277ba34..63505feb38 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2945,14 +2945,22 @@ static int 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.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-20 12:44:12.873098998 +0000 +++ 0002-net-dpaa2-fix-duplicate-call-of-close.patch 2025-11-20 12:44:12.766087696 +0000 @@ -1 +1 @@ -From 3b8225353ea3b9eb03df5dee94a037582d0d6748 Mon Sep 17 00:00:00 2001 +From 883e6017cbc409d696b63aad17a6e972b01785ad 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 1f3277ba34..63505feb38 100644 @@ -34 +35 @@ -@@ -3347,14 +3347,22 @@ static int +@@ -2945,14 +2945,22 @@ static int