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:   Sun, 6 Sep 2020 14:55:18 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Support Opensource <support.opensource@...semi.com>
Cc:     linux-kernel@...r.kernel.org, patches@...nsource.cirrus.com
Subject: Re: [PATCH 1/3] regulator: don't require mutex for
 regulator_notifier_call_chain()

10.08.2020 07:33, Michał Mirosław пишет:
> Since 3801b86aa482 ("regulator: Refactor supply implementation
> to work as regular consumers") we no longer cascade notifications
> and so notifier head's built-in rwsem is enough to protect the
> notifier chain. Remove the requirement to fix one case where
> rdev->mutex might be forced to be taken recursively.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> ---
>  drivers/regulator/core.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index b0662927487c..f4035167e7ba 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -4658,14 +4658,11 @@ EXPORT_SYMBOL_GPL(regulator_bulk_free);
>   * @data: callback-specific data.
>   *
>   * Called by regulator drivers to notify clients a regulator event has
> - * occurred. We also notify regulator clients downstream.
> - * Note lock must be held by caller.
> + * occurred.
>   */
>  int regulator_notifier_call_chain(struct regulator_dev *rdev,
>  				  unsigned long event, void *data)
>  {
> -	lockdep_assert_held_once(&rdev->mutex.base);
> -
>  	_notifier_call_chain(rdev, event, data);
>  	return NOTIFY_DONE;
>  
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ