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] [day] [month] [year] [list]
Message-ID: <CADBw62qrEutxcaEHg=C-tjVe7vQGwW_7kTVwN-fyohoGnQ903w@mail.gmail.com>
Date:   Tue, 2 Jun 2020 21:59:45 +0800
From:   Baolin Wang <baolin.wang7@...il.com>
To:     Navid Emamdoost <navid.emamdoost@...il.com>
Cc:     Mark Brown <broonie@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-spi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        emamd001@....edu, wu000273@....edu, kjlu@....edu, smccaman@....edu
Subject: Re: [PATCH] spi: sprd: call pm_runtime_put if pm_runtime_get_sync fails

Hi,

On Tue, Jun 2, 2020 at 1:20 PM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> Call to pm_runtime_get_sync increments counter even in case of
> failure leading to incorrect ref count.
> Call pm_runtime_put_noidle if pm_runtime_get_sync fails.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>

Looks good to me. Thanks
Reviewed-by: Baolin Wang <baolin.wang7@...il.com>

> ---
>  drivers/spi/spi-sprd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c
> index 6678f1cbc566..860032af4b98 100644
> --- a/drivers/spi/spi-sprd.c
> +++ b/drivers/spi/spi-sprd.c
> @@ -1018,6 +1018,7 @@ static int sprd_spi_remove(struct platform_device *pdev)
>         ret = pm_runtime_get_sync(ss->dev);
>         if (ret < 0) {
>                 dev_err(ss->dev, "failed to resume SPI controller\n");
> +               pm_runtime_put_noidle(&pdev->dev);
>                 return ret;
>         }
>
> --
> 2.17.1
>


-- 
Baolin Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ