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]
Date:   Fri, 17 Jan 2020 19:28:04 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Cc:     Collabora Kernel ML <kernel@...labora.com>, drinkcat@...omium.org,
        dianders@...omium.org, Liam Girdwood <lgirdwood@...il.com>,
        mka@...omium.org
Subject: Re: [PATCH] regulator: vctrl-regulator: Avoid deadlock getting and
 setting the voltage

16.01.2020 12:45, Enric Balletbo i Serra пишет:
> `cat /sys/kernel/debug/regulator/regulator_summary` ends on a deadlock
> when you have a voltage controlled regulator (vctrl).
> 
> The problem is that the vctrl_get_voltage() and vctrl_set_voltage() calls the
> regulator_get_voltage() and regulator_set_voltage() and that will try to lock
> again the dependent regulators (the regulator supplying the control voltage).
> 
> Fix the issue by exporting the unlocked version of the regulator_get_voltage()
> and regulator_set_voltage() API so drivers that need it, like the voltage
> controlled regulator driver can use it.
> 
> Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking")
> Reported-by: Douglas Anderson <dianders@...omium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
> ---
> 
>  drivers/regulator/core.c            |  2 ++
>  drivers/regulator/vctrl-regulator.c | 38 +++++++++++++++++------------
>  2 files changed, 25 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 03d79fee2987..e7d167ce326c 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -3470,6 +3470,7 @@ int regulator_set_voltage_rdev(struct regulator_dev *rdev, int min_uV,
>  out:
>  	return ret;
>  }
> +EXPORT_SYMBOL(regulator_set_voltage_rdev);
>  
>  static int regulator_limit_voltage_step(struct regulator_dev *rdev,
>  					int *current_uV, int *min_uV)
> @@ -4034,6 +4035,7 @@ int regulator_get_voltage_rdev(struct regulator_dev *rdev)
>  		return ret;
>  	return ret - rdev->constraints->uV_offset;
>  }
> +EXPORT_SYMBOL(regulator_get_voltage_rdev);

I think it should be EXPORT_SYMBOL_GPL().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ