[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160503000512.244790709@linuxfoundation.org>
Date: Mon, 2 May 2016 17:12:22 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tyler Baker <tyler.baker@...aro.org>,
Mark Brown <broonie@...nel.org>,
Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH 4.4 114/163] regulator: core: Ensure we lock all regulators
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@...nel.org>
commit 49a6bb7a1c0963f260e4b0dcc2c0e56ec65a28b2 upstream.
The latest workaround for the lockdep interface's not using the second
argument of mutex_lock_nested() changed the loop missed locking the last
regulator due to a thinko with the loop termination condition exiting
one regulator too soon.
Reported-by: Tyler Baker <tyler.baker@...aro.org>
Signed-off-by: Mark Brown <broonie@...nel.org>
Cc: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -141,7 +141,7 @@ static void regulator_lock_supply(struct
int i;
mutex_lock(&rdev->mutex);
- for (i = 1; rdev->supply; rdev = rdev->supply->rdev, i++)
+ for (i = 1; rdev; rdev = rdev->supply->rdev, i++)
mutex_lock_nested(&rdev->mutex, i);
}
Powered by blists - more mailing lists