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 3DE3FA0C41 for ; Tue, 30 Nov 2021 17:37:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 383BF410F7; Tue, 30 Nov 2021 17:37:09 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 8E45F411B8 for ; Tue, 30 Nov 2021 17:37:07 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 687F53F044 for ; Tue, 30 Nov 2021 16:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290227; bh=6ChZGV21PhUhj8ACHnwkGKsZBouqG4IE9VbwbuACLtQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=X1qkyr1arr7TwgJeZav7f0YMrqmJU/zgySWXxwOVf9sIjt8BH1p9EbCG1yELum5/L j/D6eNzFYWqKhxGgZU4OHE/aFu/RTJGHtRI7ozRu8FTAyhFJj9KkRkTVcC0tae4aH0 8Wx5PHLxZqxgZu2Y8muh/viyNg20as0mD5z5vzzlmqb9PmlaysmdzMu/LLTY+u3SVJ 0XZ55/VMP9+CH/kPCxGp0HjfGjfWpivS/Cbd9CwUogDTrIjDIaXipdBmWyJ6us2dPO PioXCZUQJqfDVlpt7SlerKy6G9jPmnnDIKm2MgivvaopcktgU7kkgd+cmtRz7Gz0+1 uxa71si6vMDoQ== Received: by mail-ed1-f70.google.com with SMTP id 30-20020a508e5e000000b003f02e458b17so10713915edx.17 for ; Tue, 30 Nov 2021 08:37:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ChZGV21PhUhj8ACHnwkGKsZBouqG4IE9VbwbuACLtQ=; b=U05ognnlclRjowVZVgDeMb/QDPfNkqNTZb927RWtq6quXOkEK/PQ6C+f/oM00iP9ax 8hyXDcc+XhwiYeN2h8cpVARi47FcA/Pxr514iKmuetHGte422PvbbthM9dIdbM+wXT9V BWBhr18MImINNMI740HCcwguHP2n0yxSMmzugmFjdgzQZOYCRQ++6IgYI0hpg+DOHJAw 4rEIWM1ifNS9fdAAjlahxexhtZwHVnDV15u20T8BH+iT+zOru5Qj7nEMV/Wt78xeCcd6 P91O8w4ww9NHs/1vD/JI+tWKHUBx3S55Q+clhGQLHdVGStqn3KajKF9OTnuPNb8Xt3Ip ANJA== X-Gm-Message-State: AOAM531aoolFdTojee94J8oZvR6FQ74RYQFnoXEZPBqq6lFHc9EkTNUc bSSlDQhgTot8Px9WbuBCEvcR2PEY/Y5EVUdJOggeZ1VYPdYsJJMh7EY2B8qtwoOP4NZxmLOjOyx xM3znMEVMlgGsuTDiXf5n1iLx X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr160908ejc.247.1638290226898; Tue, 30 Nov 2021 08:37:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6Gpzz1gZcMmDb868O8mB2eSKw3MBnY56Y7Ndx+lELtivD6dtupTl4DUSVfyT26AS2n66Juw== X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr160882ejc.247.1638290226682; Tue, 30 Nov 2021 08:37:06 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id dy4sm11442914edb.92.2021.11.30.08.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:37:06 -0800 (PST) From: christian.ehrhardt@canonical.com To: Chengfeng Ye Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/axgbe: fix unreleased lock in I2C transfer' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:33:43 +0100 Message-Id: <20211130163605.2460997-19-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 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 19.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 December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/306226d765c0cba6f065f49761bcf9f0d37e4fc8 Thanks. Christian Ehrhardt --- >From 306226d765c0cba6f065f49761bcf9f0d37e4fc8 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 [ 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 204ec36798..1b6094d6f0 100644 --- a/drivers/net/axgbe/axgbe_i2c.c +++ b/drivers/net/axgbe/axgbe_i2c.c @@ -227,6 +227,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; } @@ -243,6 +244,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.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:07.238735447 +0100 +++ 0019-net-axgbe-fix-unreleased-lock-in-I2C-transfer.patch 2021-11-30 16:50:05.558871827 +0100 @@ -1 +1 @@ -From 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 Mon Sep 17 00:00:00 2001 +From 306226d765c0cba6f065f49761bcf9f0d37e4fc8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index ab3738a12e..a2798f484e 100644 +index 204ec36798..1b6094d6f0 100644 @@ -24 +25 @@ -@@ -233,6 +233,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op) +@@ -227,6 +227,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op) @@ -32 +33 @@ -@@ -249,6 +250,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op) +@@ -243,6 +244,7 @@ static int axgbe_i2c_xfer(struct axgbe_port *pdata, struct axgbe_i2c_op *op)