[dpdk-stable] patch 'net/axgbe: fix unreleased lock in I2C transfer' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:28:37 CET 2021
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 <xuemingl at nvidia.com>
---
>From a202064ef3f8953c8762fe39cc732646b2446845 Mon Sep 17 00:00:00 2001
From: Chengfeng Ye <cyeaa at connect.ust.hk>
Date: Thu, 26 Aug 2021 11:55:59 -0700
Subject: [PATCH] net/axgbe: fix unreleased lock in I2C transfer
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 <cyeaa at connect.ust.hk>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
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 <xuemingl at nvidia.com>
+
+[ upstream commit 30b4d95a29b1bf7e868d799952aa1fa1348d5e25 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list