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 24D3E41D8D for ; Mon, 27 Feb 2023 08:03:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D443410EE; Mon, 27 Feb 2023 08:03:50 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2085.outbound.protection.outlook.com [40.107.95.85]) by mails.dpdk.org (Postfix) with ESMTP id 82A9D40A7D for ; Mon, 27 Feb 2023 08:03:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YgoFtSpKMltLh3fXcNKJZRjcGBfDHC1n8YgrvGievLngB5DviUxUbsvgCZ7w/Uiy4hk6ns2/YgF2FTf400tmdzhuroL51G1EKqD+7ZQp58+9hG7DpWMVhbFAnSeDDZDv50qoTV9pGo7cnSp5m0QVzqxW1l8rKf0lUaczFksXRvFYS2m3A9vUwE1WkEv0J6OvuyA8NiOaSQdtnpn0jwYt2bh529r9neOzmLYXjlcm1vj3QMB1csWxnkVVn51wN/6bUElwKpZJdSpkQFhzZZ80DW8MVeLSvEQHgklzyQwmeu1n5/c/aElfPiSnK2U4uG1AFKJtW1SFMCdVHb0wrXnRjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ekBxocY+b4m9jMPho02q+FuR4TelPTwbesPGgkDUGY8=; b=iU2qNhc7zM7zl5VLLQO4tS0VN5bU+oGHGwnWf97VQmrrHbjfdGCZezNMv3+C6NRoLGwjV8JBpVHTR/m12gfkhD+AAYOUFt0O3uKVUFL5LaCunSNkOXzk+dpcxTtWMbioNPFpG7aF57RGj175GbJpt44mSK4AtVf/EcDkkr+3Tsb9PVQ9NwcMLNm8CLN4GvZMBur9Yw1lrJteIkP6eGsNFmCDZyZ/Z7tHRbCwB8lgPVbsX7n0fYs/dQHETVRbCCXZBky9/xHoI65snGHRTJxUjy2JdlwRonc4oS7FzZ6+zJidCHhdoJdw7jV7wQCY2rbqRWPmdzXbCYl1QBS09xFBIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=solid-run.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 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=ekBxocY+b4m9jMPho02q+FuR4TelPTwbesPGgkDUGY8=; b=fQ4IVACVTstZgnl2C/BIWP/yJuDqDMyT5XGwStF0vHo9ujvxn9lbmrmKIAqqbkX+g2uEPo+rCV0ExC5yasXL63rb2RXryVeuNaqkeALdnBWAbxGSaJGChCHplfwZuA9mQbDb7P88IuC9AuKuzHBu1hPfA6EGeYHPcJ7f24r4MNFVPV15fL+UH5GaPdOwFrmuKTIxLoEOL7fPtUsQdRdyQiqbOunBJMdw2tY28LiODJJLbRv71DZobErmuAShWCH1UR6/4QAcJZw8tQbDxbAyvgqRa6qFC7tC8vUn0dGE8tN4Tr4gX2dxfrWxlhXQwPZQ4T4lmNl94AzZs6C/QzFnjw== Received: from BN9PR03CA0270.namprd03.prod.outlook.com (2603:10b6:408:ff::35) by DM4PR12MB6205.namprd12.prod.outlook.com (2603:10b6:8:a8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.26; Mon, 27 Feb 2023 07:03:48 +0000 Received: from BL02EPF000108EA.namprd05.prod.outlook.com (2603:10b6:408:ff:cafe::a0) by BN9PR03CA0270.outlook.office365.com (2603:10b6:408:ff::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:03:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF000108EA.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 07:03:47 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:03:36 -0800 Received: from nvidia.com (10.126.230.37) 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.986.37; Sun, 26 Feb 2023 23:03:33 -0800 From: Xueming Li To: Alvaro Karsz CC: David Marchand , dpdk stable Subject: patch 'bus/fslmc: fix deadlock on MC send command timeout' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:58:49 +0800 Message-ID: <20230227070107.15664-21-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF000108EA:EE_|DM4PR12MB6205:EE_ X-MS-Office365-Filtering-Correlation-Id: 81f7fd00-25db-4d52-5ca7-08db1890c5e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VHvPbMmXhUf436GlxKmFOPcCc5tbnQaneD2z/5cX7to/UpgA8/b3kmHXAUeTaUN+sAnyUrUI3pwCS19LtHhJIKyn57xusRtRKhc8EOxnb+E1saHBZEDeIONOjQ4KF0Nw8moKrUF5fEJmPGdJmkqJ8ysgZ9WQfMmBgXOtR1Q157prDpKTGuoDiZBCw6ygSEuVLIXHfop7wF9/uj4z6GwiLcngKYhLcF3UMnSFNC/04gSX0tN8Ydub5KsQq0jkYV7jxlQ/RMwqSv+4geNvAtosMtckwl+pV9oAse3OGkBkA/sF9gxTJ57I3oLOSWYbaz2/AfsiRHSb1skRB3yJ733nvN7mw7iHbNTyFfNPbU5fph3QjZHcYuLRalhqE9LpO3kMpdn7f4kBnKhbgwxz0H5BXbqEWfFdOdabjdJ1Jl4FdmFXefg8oG3xhXR8BFjVyDyh3hgUDBNPqWc4A+2Tip4TwmzamF9r5mFJHLqSaQC/cKP/9Nmm31WWfHZur9uIsMupiEx3e0SJGYYQbPW5SIYi+xqX0XN+uAIeQnVsaUshpG369ItNNcLHjoAh4js5ouM60TMKSq9juR1TNBUh3R8jdA5WI0yf7TEVFHDNQaHitTHIzaJ9EcIfeu3o8B/I3/Z8A3ehp2NNBlFiRuyo5k+akDbQ5LjK4zMC5lC94UjIaJR2xyUbe2Inx/8hQR1xUCAOhUEtSGOJ/ZCC2bnnseepI9R6V/q3tN1iQyr0/ClcJUpvgUfUHEHhAmfAO0pLsVXQyfOTnmBMv0FAMerulteAclb9XNe4UNXY2gh3YHsbCQ4= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(136003)(39860400002)(396003)(346002)(376002)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(47076005)(83380400001)(2616005)(36860700001)(82740400003)(356005)(82310400005)(7636003)(40480700001)(55016003)(8936002)(41300700001)(2906002)(6286002)(1076003)(186003)(26005)(53546011)(6666004)(5660300002)(16526019)(4326008)(86362001)(316002)(6916009)(7696005)(966005)(478600001)(8676002)(70586007)(70206006)(54906003)(426003)(336012)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:03:47.5304 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81f7fd00-25db-4d52-5ca7-08db1890c5e4 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF000108EA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6205 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=23a5b25c8aca04fc1e79890b3e92c3f646c5a72d Thanks. Xueming Li --- >From 23a5b25c8aca04fc1e79890b3e92c3f646c5a72d Mon Sep 17 00:00:00 2001 From: Alvaro Karsz Date: Wed, 4 Jan 2023 09:40:51 +0200 Subject: [PATCH] bus/fslmc: fix deadlock on MC send command timeout Cc: Xueming Li [ upstream commit 06cce2876a37ac6161652bd121ce1ff03d52cce5 ] Bug in function mc_send_command: a spinlock is not unlocked in case of timeouts. Fixes: 79711846f676 ("bus/fslmc: add timeout in MC send command") Signed-off-by: Alvaro Karsz Reviewed-by: David Marchand --- .mailmap | 1 + drivers/bus/fslmc/mc/mc_sys.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 75884b6fe2..db7440407b 100644 --- a/.mailmap +++ b/.mailmap @@ -64,6 +64,7 @@ Ali Volkan Atli Allain Legacy Allen Hubbe Alok Makhariya +Alvaro Karsz Alvin Zhang Aman Singh Amaranath Somalapuram diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c index ab9a074835..76fdcd5c8a 100644 --- a/drivers/bus/fslmc/mc/mc_sys.c +++ b/drivers/bus/fslmc/mc/mc_sys.c @@ -77,8 +77,11 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd) total_time = rte_get_timer_cycles() - start_time; } while (status == MC_CMD_STATUS_READY && total_time <= time_to_wait); - if (status == MC_CMD_STATUS_READY) + if (status == MC_CMD_STATUS_READY) { + rte_spinlock_unlock(&mc_portal_lock); + return mc_status_to_error(MC_CMD_STATUS_TIMEOUT); + } /* Read the response back into the command buffer */ mc_read_response(mc_io->regs, cmd); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:41.670737000 +0800 +++ 0022-bus-fslmc-fix-deadlock-on-MC-send-command-timeout.patch 2023-02-27 14:08:40.739237000 +0800 @@ -1 +1 @@ -From 06cce2876a37ac6161652bd121ce1ff03d52cce5 Mon Sep 17 00:00:00 2001 +From 23a5b25c8aca04fc1e79890b3e92c3f646c5a72d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 06cce2876a37ac6161652bd121ce1ff03d52cce5 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org