* [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
@ 2016-04-29 0:43 John Stultz
2016-04-29 10:20 ` Mark Brown
2016-05-06 16:06 ` Greg Kroah-Hartman
0 siblings, 2 replies; 4+ messages in thread
From: John Stultz @ 2016-04-29 0:43 UTC (permalink / raw)
To: lkml
Cc: John Stultz, Mark Brown, Tyler Baker, Thierry Reding,
Greg Kroah-Hartman, stable
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@kernel.org>
Cc: Tyler Baker <tyler.baker@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: stable <stable@vger.kernel.org> # 4.4 only (I think)
Fixes: 3c2c5fb9b99ca ("regulator: core: avoid unused variable warning")
Originally-Reported-by: Tyler Baker <tyler.baker@linaro.org>
Originally-by: Mark Brown <broonie@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
2016-04-29 0:43 [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators John Stultz
@ 2016-04-29 10:20 ` Mark Brown
2016-05-06 16:06 ` Greg Kroah-Hartman
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-04-29 10:20 UTC (permalink / raw)
To: John Stultz; +Cc: lkml, Tyler Baker, Thierry Reding, Greg Kroah-Hartman, stable
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
On Thu, Apr 28, 2016 at 05:43:37PM -0700, John Stultz wrote:
> 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.
This is really just the result of backporting 49a6bb7a1c0963 (regulator:
core: Ensure we lock all regulators) and the commit above.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
2016-04-29 0:43 [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators John Stultz
2016-04-29 10:20 ` Mark Brown
@ 2016-05-06 16:06 ` Greg Kroah-Hartman
2016-05-06 17:57 ` John Stultz
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-06 16:06 UTC (permalink / raw)
To: John Stultz; +Cc: lkml, Mark Brown, Tyler Baker, Thierry Reding, stable
On Thu, Apr 28, 2016 at 05:43:37PM -0700, John Stultz wrote:
> 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@kernel.org>
> Cc: Tyler Baker <tyler.baker@linaro.org>
> Cc: Thierry Reding <treding@nvidia.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CC: stable <stable@vger.kernel.org> # 4.4 only (I think)
> Fixes: 3c2c5fb9b99ca ("regulator: core: avoid unused variable warning")
> Originally-Reported-by: Tyler Baker <tyler.baker@linaro.org>
> Originally-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: John Stultz <john.stultz@linaro.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);
> }
>
This should now all be fixed in 4.4.9, and this patch isn't needed,
right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
2016-05-06 16:06 ` Greg Kroah-Hartman
@ 2016-05-06 17:57 ` John Stultz
0 siblings, 0 replies; 4+ messages in thread
From: John Stultz @ 2016-05-06 17:57 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: lkml, Mark Brown, Tyler Baker, Thierry Reding, stable
On Fri, May 6, 2016 at 9:06 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Apr 28, 2016 at 05:43:37PM -0700, John Stultz wrote:
>> 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@kernel.org>
>> Cc: Tyler Baker <tyler.baker@linaro.org>
>> Cc: Thierry Reding <treding@nvidia.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> CC: stable <stable@vger.kernel.org> # 4.4 only (I think)
>> Fixes: 3c2c5fb9b99ca ("regulator: core: avoid unused variable warning")
>> Originally-Reported-by: Tyler Baker <tyler.baker@linaro.org>
>> Originally-by: Mark Brown <broonie@kernel.org>
>> Signed-off-by: John Stultz <john.stultz@linaro.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);
>> }
>>
>
> This should now all be fixed in 4.4.9, and this patch isn't needed,
> right?
Yea. Looks right to me in 4.4.9.
thanks!
-john
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-06 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 0:43 [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators John Stultz
2016-04-29 10:20 ` Mark Brown
2016-05-06 16:06 ` Greg Kroah-Hartman
2016-05-06 17:57 ` John Stultz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.