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 D0C4345E41 for ; Sat, 7 Dec 2024 09:08:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C96D540E4C; Sat, 7 Dec 2024 09:08:39 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) by mails.dpdk.org (Postfix) with ESMTP id 1F82E40281 for ; Sat, 7 Dec 2024 09:08:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JHCbiLg9/54Nvm/BxEi9+sBfhiWq7ryTgmaHrtMWtC8KSqGKvIV1XJVIEdj59Z3sO9ijN+Goj8wGvPCNQp9XE7El/WhleZhLU3BhkEeUBDeaJgMTVfVT1yVmLY5FxzA2ZSCo1bmQQiFC4vvKxc9Z6rFqluAQNBWGzW5SmAXqSHyVioVDA5kcXNXnaJObieQyXGT7GuqAbuSc6jZWxUrGwCXsVDOEV88P16XQ1QRxiBH6ONoUEgycpWiuUki/NDn4lNZjOVsQDPefeoJ5rJESaNj/SDYyoHxvCvct4MJllI6HpwlHodHfZFXwjOciNuQjO1VlWompmoiJ9MZlq8pZ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1aNuzj84J3xfhHUR+VC8eMD5/Qg27OY4l4rDeIaPm3M=; b=Ffox3rC1OsedtMS57zcJioMj+9t5T29tFdlvRtqf+J8KvhDYZHQHydi077Cbzil0beMoi3D0n7MOARdQuKgEeSdo2ahNl+dm6zI8ofOZNrOgLsQnUTNhVvhASZ7+9ES8TAk6jPK8h1UkytS67LWt0KNkFzBxqk06J6Emkm2tNsWeYsVqAjOJW+puNW2G7s1h4Uqo/cav4GvvZdHgsbXMDqzc/Tab9FAmgwSRGCapCVgsb8YXwoDoBrfVst019UuEhDOThcD7FRMOlSVg3nd1zZo4xRYFsoPOQqr7CMaDGYOA/LRWoAfTVfTYl16NkN/OnzvAE3kHse5nc5x1f3P8KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nxp.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1aNuzj84J3xfhHUR+VC8eMD5/Qg27OY4l4rDeIaPm3M=; b=JYVPD45zvJqSzZDdseDAzP2TDX4nBMYD4tvflSSvK+84TyjVA7AhkhTYNirhQwpFJCToDue3oJMn0HZ62dfF1PXrTj1WDzOoc0t3DldOFqsB8maPBMbmk2dl90zLhaUDm6ix8lUJ17lJ/+kpBZyZ3AdlS4HnAEnyIA7oo+7zGmzj2gG/aFTB1LAdC6OsxmIYit0coqawoeDjOf/dEwtZrh+LVCTWeSZujs05B1C3tXIiHq4B/Zun16lvU5UDKmTcfKTJJxzB/6V1BzRwroTjORILspdpoSYst5agLzhyFlnpxSh/ilpY20LVea04JsautaHEM9lIQHKbWWd+5SxpmQ== Received: from BN9P220CA0009.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::14) by SA0PR12MB4397.namprd12.prod.outlook.com (2603:10b6:806:93::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Sat, 7 Dec 2024 08:08:33 +0000 Received: from BL02EPF00021F6B.namprd02.prod.outlook.com (2603:10b6:408:13e:cafe::5e) by BN9P220CA0009.outlook.office365.com (2603:10b6:408:13e::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.13 via Frontend Transport; Sat, 7 Dec 2024 08:08:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF00021F6B.mail.protection.outlook.com (10.167.249.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sat, 7 Dec 2024 08:08:33 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:08:21 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:08:19 -0800 From: Xueming Li To: Hemant Agrawal CC: Xueming Li , dpdk stable Subject: patch 'bus/dpaa: fix lock condition during error handling' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 16:00:34 +0800 Message-ID: <20241207080055.488538-77-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241207080055.488538-1-xuemingl@nvidia.com> References: <20241111062847.216344-122-xuemingl@nvidia.com> <20241207080055.488538-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6B:EE_|SA0PR12MB4397:EE_ X-MS-Office365-Filtering-Correlation-Id: c7634dfa-a336-4a07-3378-08dd16965819 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DheHXg8CUdHZft2kmOMOVVgMy62+zi7Nyclmtnz5xNMTGZ6qhRtnbOv2+LrM?= =?us-ascii?Q?LIk0nod8DxT/2LK4JgY+y+4hdgBtWgRbFWyEKg7gsuUvXoBravzY5/tcktA0?= =?us-ascii?Q?5P3kvr83JdHWaxRz3HbMwAEcm/U2gRTx2xKKVdyHgRhXCfV0NYX9NFVU3CnE?= =?us-ascii?Q?4od1kbg0pK4NpAF2qTuGC4dVULLalV6+U/4Wdcs2Qg/l0PWXpg2CpbuNdOa+?= =?us-ascii?Q?RzIm/4TnpYnhY2pxYdu/CNN6DnFS1yR2JCCEQ7WnjhAo3etaBsmV7p0m/9yo?= =?us-ascii?Q?7K+dnLL79OQpQ3ltnizDD26766IAWaHPKokQpqWMe4CfhJSFfOVhknEot5TU?= =?us-ascii?Q?feG6CQKRZ+T/GO48JVj/pEu8OjQxM+N1XWCGebFyGh7woGZTqLCShZsU4KX1?= =?us-ascii?Q?mxV0wQ64NghyetXWf6ng8hNG8cwtjq8L6zar4pcAvQ7qgKjSrQUGNU1toPir?= =?us-ascii?Q?cgG8x/w/gOmMWnkUCESHJyOKDA4ZsQyxZOyS6iB4dYIzGx1VLW4OO3X9XGwd?= =?us-ascii?Q?CB3ymYz6s8EQF0sNIDKbhQDsuydDlubUZs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+HmPNgaeiaUlCYJoiwaP?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:08:33.3399 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7634dfa-a336-4a07-3378-08dd16965819 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4397 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 23.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 12/10/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=4aeba4668f3ad2f4fd908a46d0ed687c2b575870 Thanks. Xueming Li --- >From 4aeba4668f3ad2f4fd908a46d0ed687c2b575870 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Thu, 14 Nov 2024 13:14:35 +0530 Subject: [PATCH] bus/dpaa: fix lock condition during error handling Cc: Xueming Li [ upstream commit c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 ] The error handling is missing FQ unlock code. Detected by pvs-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines") Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index f06992ca48..3a1a843ba0 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -2169,8 +2169,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags) if (!p->vdqcr_owned) { FQLOCK(fq); - if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) + if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) { + FQUNLOCK(fq); goto escape; + } fq_set(fq, QMAN_FQ_STATE_VDQCR); FQUNLOCK(fq); p->vdqcr_owned = fq; @@ -2203,8 +2205,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused, if (!p->vdqcr_owned) { FQLOCK(fq); - if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) + if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) { + FQUNLOCK(fq); goto escape; + } fq_set(fq, QMAN_FQ_STATE_VDQCR); FQUNLOCK(fq); p->vdqcr_owned = fq; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:46.649381102 +0800 +++ 0076-bus-dpaa-fix-lock-condition-during-error-handling.patch 2024-12-06 23:26:44.073044826 +0800 @@ -1 +1 @@ -From c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 Mon Sep 17 00:00:00 2001 +From 4aeba4668f3ad2f4fd908a46d0ed687c2b575870 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c7c3a329750b81bdaeb3f7ceffac0ec3a65f61f8 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 9c90ee25a6..c48fa3e073 100644 +index f06992ca48..3a1a843ba0 100644 @@ -24 +26 @@ -@@ -2138,8 +2138,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags) +@@ -2169,8 +2169,10 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags) @@ -36 +38 @@ -@@ -2172,8 +2174,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused, +@@ -2203,8 +2205,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,