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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Nov 2010 13:22:29 +0100
From:	Mattias Wallin <mattias.wallin@...ricsson.com>
To:	Liam Girdwood <lrg@...mlogic.co.uk>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	<linux-kernel@...r.kernel.org>,
	Mattias Wallin <mattias.wallin@...ricsson.com>
Subject: [PATCH] regulator: regulator disable supply fix

This patch fixes a disable failure when regulator supply is used.
A while loop in regulator disable checks for supply pointer != NULL
but the pointer is not always updated, resulting in the while loop
running too many times causing a disable failure.

Signed-off-by: Mattias Wallin <mattias.wallin@...ricsson.com>
---
 drivers/regulator/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f1d10c9..dc7d36e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1424,6 +1424,7 @@ int regulator_disable(struct regulator *regulator)
 	/* decrease our supplies ref count and disable if required */
 	while (supply_rdev != NULL) {
 		rdev = supply_rdev;
+		supply_rdev = NULL;
 
 		mutex_lock(&rdev->mutex);
 		_regulator_disable(rdev, &supply_rdev);
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ