lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1461890617-29209-1-git-send-email-john.stultz@linaro.org>
Date:	Thu, 28 Apr 2016 17:43:37 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	John Stultz <john.stultz@...aro.org>,
	Mark Brown <broonie@...nel.org>,
	Tyler Baker <tyler.baker@...aro.org>,
	Thierry Reding <treding@...dia.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	stable <stable@...r.kernel.org>
Subject: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators

It seems upstream commit 49a6bb7a1c09 ("regulator: core: Ensure
we lock all regulators"), was missed when considering tagging
for -stable.

Without this varient of that patch (the original doesn't apply,
due to a later fix to the same which was backported), I see
double-unlock lockdep splats in the v4.4.8 based HiKey kernel.

Cc: Mark Brown <broonie@...nel.org>
Cc: Tyler Baker <tyler.baker@...aro.org>
Cc: Thierry Reding <treding@...dia.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: stable <stable@...r.kernel.org> # 4.4 only (I think)
Fixes: 3c2c5fb9b99ca ("regulator: core: avoid unused variable warning")
Originally-Reported-by: Tyler Baker <tyler.baker@...aro.org>
Originally-by: Mark Brown <broonie@...nel.org>
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7b94b8e..732ac71 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -148,7 +148,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev)
 {
 	int i;
 
-	for (i = 0; rdev->supply; rdev = rdev_get_supply(rdev), i++)
+	for (i = 0; rdev; rdev = rdev_get_supply(rdev), i++)
 		mutex_lock_nested(&rdev->mutex, i);
 }
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ