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 81383A034F for ; Wed, 10 Nov 2021 07:36:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BC46410EF; Wed, 10 Nov 2021 07:36:01 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2046.outbound.protection.outlook.com [40.107.237.46]) by mails.dpdk.org (Postfix) with ESMTP id 8A29140683 for ; Wed, 10 Nov 2021 07:36:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fQLoyACQQVQbHPmYDlYgm8i7Vyg9R6FkYzPGxySeO8zouu9WZahGUhq1Ik0OXaLIH4DmfcQbyFIznWEoNK87kVFSLZccVckfsqiqBvo9arAd3LzHCMRBYwtHGMSkLa8Qe1ZqsHx9TVNIDLDvfNAPg+2wy3HtUEAq7rBaoU9A6K4tp/5pYTnWH9GVXC1FkD2m6FEpHVNsfhEak76/aHJZtbVWnEV/XBDM0jfWMEEpk3XscEH4sGNWBfyFqrXYr37ydmk4fa7Fcbu+FQ8kjHdW1jSBUQbXqGS/ViHqFV0W9t/jP8wuHCN5ZLANDmfzW2orTYt7aiiq+W8OoG4RK7PGOQ== 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=Fxy5iL5Kfxj+yVA1z0Rr2k3ZNoF5EV+mpRD+Lg70CR0=; b=NwPG3PgUQhtfHlEysWpIjBwm3xQhgIesXc6ksSNEomirDSsuVnsK4c5JoOBOAM7fkPipt1ZKKcCZbxJ17TFw+x9KcpcuYpWCtYoYI21aALnEbqA4yaWqAjdn+zPBtccrqGTJtuwOueXUOk8JGOtmcSKa/Q8esbIhAIknTOZ0tKf1yLTaSiWzZimQ05wgbglPwPsGPcydgyjy+uj4yyQo5ri5QBfoqxhlXRaM0bGSSTe9ABJenagpLio3uxCl3SWgsODcT2eFmlesO+vIDlBRBSm9Ehw0aVQ6v577T31VI9Wyh477ddjInyE1Vr657YYy0OQmxkX4wZqebJfLkWnaBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=Fxy5iL5Kfxj+yVA1z0Rr2k3ZNoF5EV+mpRD+Lg70CR0=; b=Y1gwEEYMhYDQebhJWmo4EkawiTzrr7R3bEkHB+sYEh2dXFCuu5BX710nJCrXMcXXYRCND538mhH14Z5TXa55lTNvLxWV1665ARBKIAAGJ8bEVfp8MKNxU/nAuISte92U0i8vZBTpF8tZc2kBI7TRdlipq+VsqXmN6KEQsBHUI2QPgYtsixihtt7mLa/313t1dfr7ujnFDGwF3RkDFWNiG0zLnssy/mDKOO761h244U82vdD4cNIziD02Nr/sjv5QnTAaBJSQOnlffT70Low3Iyd1SZelEXULcVdopsyQrWEliiejjZUgjt1qxBUE4sbS9T0ZUd2aFLZLG+UdRrd9cw== Received: from DS7PR03CA0355.namprd03.prod.outlook.com (2603:10b6:8:55::30) by DM6PR12MB3884.namprd12.prod.outlook.com (2603:10b6:5:1c7::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 10 Nov 2021 06:35:58 +0000 Received: from DM6NAM11FT005.eop-nam11.prod.protection.outlook.com (2603:10b6:8:55:cafe::e3) by DS7PR03CA0355.outlook.office365.com (2603:10b6:8:55::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:35:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT005.mail.protection.outlook.com (10.13.172.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:35:58 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:35:56 +0000 From: Xueming Li To: Chengfeng Ye CC: Luca Boccassi , Ferruh Yigit , dpdk stable Date: Wed, 10 Nov 2021 14:28:37 +0800 Message-ID: <20211110063216.2744012-34-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: daaca0ca-1b39-4206-7a70-08d9a4145b37 X-MS-TrafficTypeDiagnostic: DM6PR12MB3884: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fD+uH/nUzZ/+26jzreUXojhoqyFkh5vacyWRb+Bo59+XryUcLa3Slkg7M5iroi6renQWxnBJNXIIotY1JDbo9/sfukaB/mayE7lERy7aTs0hBTydwQBDqsDhKlOzfdUPYfzso+01twD0C63Fr6m4/NEhSUIlKGbDTrJSkH8ob18/nJGYTYwwMTtLQyhW6vB5mdf+OieIB+NNCXJiGcM7uvtPfGP+fIxW5O2uMKyS/WzQIl4vARZWb2RzslwJ4ggCJQojczhixiS7P/Ec0dzxjDToChHbzO4Uxyj8rGFdEZqQlw1R8Vdr4wtuEfxAhBLGb4OSM7k6Xa6BeV0QJ64Hf4AKQlqI/9+VLSJ+inKNOJSdwgTdDkBzvzYRRQX5C31UABuSHC96urzewTG/o0EkAtgN7+64wCG3sl6SelnprKyXPa77GV4jxPT/WatB4Frd2o0n0XdAa6NVymip1k+/6UQCGvVnknxPDd9JhWZESoFFEnzbBTAxVtl7uS2se4q3i1de0PjPir1PPJ8xit3d6Lg3XpTCZiHx3E3jrk3y4tQQK45iV2cn0jLNuqBfhnZocgrxJmA/ia5c3B1O8UKgWgjAb4EF2iG5cRpdPTnZUaOCKriS6g3ss2pV00GjOwEXuSA0Cmf25GwqnSXRXyUD3hlkICUsQULSydwGAgCirXG9rX7J5pnqpvIryRE0TTK6UW0PmFLRlRbj7mRK5KZH48NVR/oDurEnkY9QwH7vk4ShQZQUgpZwWAQgk7gEJydPumNtcDjA1x+QbdyXDHSuTYr7AsjC7YXk6xYKFyu8SYO8rwoeJrMetoqVPh1P/04y55bbeLoZNr2SGuap/t/KgA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(70206006)(36756003)(53546011)(316002)(508600001)(36906005)(54906003)(6916009)(82310400003)(336012)(1076003)(70586007)(7696005)(26005)(426003)(2906002)(8676002)(55016002)(36860700001)(6286002)(4001150100001)(86362001)(83380400001)(186003)(4326008)(6666004)(47076005)(16526019)(7636003)(356005)(966005)(8936002)(2616005)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:35:58.4550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: daaca0ca-1b39-4206-7a70-08d9a4145b37 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT005.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3884 Subject: [dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/a202064ef3f8953c8762fe39cc732646b2446845 Thanks. Xueming Li --- >From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001 From: Chengfeng Ye Date: Thu, 26 Aug 2021 11:55:59 -0700 Subject: [PATCH] net/axgbe: fix unreleased lock in I2C transfer Cc: Xueming Li [ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ] The lock pdata->i2c_mutex is not released if the function return in these two patched branches, which may lead to deadlock problem if this lock is acquired again. Bugzilla ID: 777 Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs") Signed-off-by: Chengfeng Ye Reviewed-by: Ferruh Yigit --- drivers/net/axgbe/axgbe_i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/axgbe/axgbe_i2c.c b/drivers/net/axgbe/axgbe_i2c.c index ab3738a12e..a2798f484e 100644 --- a/drivers/net/axgbe/axgbe_i2c.c +++ b/drivers/net/axgbe/axgbe_i2c.c @@ -233,6 +233,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op) ret = axgbe_i2c_disable(pdata); if (ret) { PMD_DRV_LOG(ERR, "failed to disable i2c master\n"); + pthread_mutex_unlock(&pdata->i2c_mutex); return ret; } @@ -249,6 +250,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op) ret = axgbe_i2c_enable(pdata); if (ret) { PMD_DRV_LOG(ERR, "failed to enable i2c master\n"); + pthread_mutex_unlock(&pdata->i2c_mutex); return ret; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.593810284 +0800 +++ 0033-net-axgbe-fix-unreleased-lock-in-I2C-transfer.patch 2021-11-10 14:17:01.780746827 +0800 @@ -1 +1 @@ -From 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 Mon Sep 17 00:00:00 2001 +From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org