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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 6 Jun 2020 17:11:53 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Navid Emamdoost <navid.emamdoost@...il.com>
Cc:     Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        emamd001@....edu, wu000273@....edu, kjlu@....edu, smccaman@....edu
Subject: Re: [PATCH] io: pressure: zpa2326: handle pm_runtime_get_sync
 failure

On Thu,  4 Jun 2020 21:44:44 -0500
Navid Emamdoost <navid.emamdoost@...il.com> wrote:

> Calling pm_runtime_get_sync increments the counter even in case of
> failure, causing incorrect ref count. Call pm_runtime_put if
> pm_runtime_get_sync fails.
> 
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>

Hi Navid,

This looks to be a fix, be it for a case that we are hopefully
unlikely to ever hit.  Please could you add an appropriate
Fixes tag so we can work out how far to backport it?

Patch looks good to me so if you just reply with a suitable
tag I can add it whilst applying.

Thanks,

Jonathan

> ---
>  drivers/iio/pressure/zpa2326.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c
> index 99dfe33ee402..245f2e2d412b 100644
> --- a/drivers/iio/pressure/zpa2326.c
> +++ b/drivers/iio/pressure/zpa2326.c
> @@ -664,8 +664,10 @@ static int zpa2326_resume(const struct iio_dev *indio_dev)
>  	int err;
>  
>  	err = pm_runtime_get_sync(indio_dev->dev.parent);
> -	if (err < 0)
> +	if (err < 0) {
> +		pm_runtime_put(indio_dev->dev.parent);
>  		return err;
> +	}
>  
>  	if (err > 0) {
>  		/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ