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]
Date:   Fri, 22 May 2020 07:36:24 +0800
From:   Peter Chen <hzpeterchen@...il.com>
To:     Dinghao Liu <dinghao.liu@....edu.cn>
Cc:     kjlu@....edu, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <felipe.balbi@...ux.intel.com>,
        Pawel Laszczak <pawell@...ence.com>,
        Colin Ian King <colin.king@...onical.com>,
        Roger Quadros <rogerq@...com>,
        USB list <linux-usb@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: cdns3: Fix runtime PM imbalance on error

On Thu, May 21, 2020 at 3:42 PM Dinghao Liu <dinghao.liu@....edu.cn> wrote:
>
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> ---
>  drivers/usb/cdns3/cdns3-ti.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
> index 5685ba11480b..e701ab56b0a7 100644
> --- a/drivers/usb/cdns3/cdns3-ti.c
> +++ b/drivers/usb/cdns3/cdns3-ti.c
> @@ -138,7 +138,7 @@ static int cdns_ti_probe(struct platform_device *pdev)
>         error = pm_runtime_get_sync(dev);
>         if (error < 0) {
>                 dev_err(dev, "pm_runtime_get_sync failed: %d\n", error);
> -               goto err_get;
> +               goto err;
>         }
>
>         /* assert RESET */
> @@ -185,7 +185,6 @@ static int cdns_ti_probe(struct platform_device *pdev)
>
>  err:
>         pm_runtime_put_sync(data->dev);
> -err_get:
>         pm_runtime_disable(data->dev);
>
>         return error;
> --

Reviewed-by: Peter Chen <peter.chen@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ