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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b95059a-055e-ac5d-61f9-dbd14d5592a6@gmail.com>
Date:   Tue, 20 Nov 2018 03:45:19 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Douglas Anderson <dianders@...omium.org>,
        Mark Brown <broonie@...nel.org>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>, evgreen@...omium.org,
        swboyd@...omium.org, ryandcase@...omium.org,
        David Collins <collinsd@...eaurora.org>,
        linux-arm-msm@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] regulator: core: Don't double-disable supplies in
 regulator_disable_deferred()

On 20.11.2018 3:26, Douglas Anderson wrote:
> In the commit f8702f9e4aa7 ("regulator: core: Use ww_mutex for
> regulators locking") disabling of the supply was moved into
> _regulator_disable().  That means regulator_disable_work() shouldn't
> be disabling since that double-disables the supply.
> 
> Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking")
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
> 
>  drivers/regulator/core.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 0052bbc8c531..63a8af1e2256 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2703,16 +2703,6 @@ static void regulator_disable_work(struct work_struct *work)
>  		regulator_balance_voltage(rdev, PM_SUSPEND_ON);
>  
>  	regulator_unlock_dependent(rdev, &ww_ctx);
> -
> -	if (rdev->supply) {
> -		for (i = 0; i < count; i++) {
> -			ret = regulator_disable(rdev->supply);
> -			if (ret != 0) {
> -				rdev_err(rdev,
> -					 "Supply disable failed: %d\n", ret);
> -			}
> -		}
> -	}
>  }
>  
>  /**
> 

Good catch!

Reviewed-by: Dmitry Osipenko <digetx@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ