Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1390674 > unrolled thread

[RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators

Started byJohn Stultz <john.stultz@linaro.org>
First post2016-04-29 02:50 +0200
Last post2016-05-06 20:00 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators John Stultz <john.stultz@linaro.org> - 2016-04-29 02:50 +0200
    Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all  regulators Mark Brown <broonie@kernel.org> - 2016-04-29 12:30 +0200
    Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all  regulators Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-06 19:30 +0200
      Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators John Stultz <john.stultz@linaro.org> - 2016-05-06 20:00 +0200

#1390674 — [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators

FromJohn Stultz <john.stultz@linaro.org>
Date2016-04-29 02:50 +0200
Subject[RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
Message-ID<rt4N3-57S-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1390971 — Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators

FromMark Brown <broonie@kernel.org>
Date2016-04-29 12:30 +0200
SubjectRe: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
Message-ID<rtdQm-4aS-31@gated-at.bofh.it>
In reply to#1390674

[Multipart message — attachments visible in raw view] — view raw

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.

[toc] | [prev] | [next] | [standalone]


#1395996 — Re: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-06 19:30 +0200
SubjectRe: [RFC][PATCH 4.4-stable] regulator: core: Ensure we lock all regulators
Message-ID<rvRJE-YG-11@gated-at.bofh.it>
In reply to#1390674
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

[toc] | [prev] | [next] | [standalone]


#1396013

FromJohn Stultz <john.stultz@linaro.org>
Date2016-05-06 20:00 +0200
Message-ID<rvScG-1c7-3@gated-at.bofh.it>
In reply to#1395996
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web