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  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:   Mon, 25 May 2020 01:36:18 +0000
From:   Joakim Zhang <qiangqing.zhang@....com>
To:     Dinghao Liu <dinghao.liu@....edu.cn>, "kjlu@....edu" <kjlu@....edu>
CC:     Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] can: flexcan: Fix runtime PM imbalance on error


> -----Original Message-----
> From: linux-can-owner@...r.kernel.org <linux-can-owner@...r.kernel.org>
> On Behalf Of Dinghao Liu
> Sent: 2020年5月22日 17:44
> To: dinghao.liu@....edu.cn; kjlu@....edu
> Cc: Wolfgang Grandegger <wg@...ndegger.com>; Marc Kleine-Budde
> <mkl@...gutronix.de>; David S. Miller <davem@...emloft.net>; Jakub
> Kicinski <kuba@...nel.org>; linux-can@...r.kernel.org;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] can: flexcan: Fix runtime PM imbalance on error
> 
> When register_flexcandev() returns an error code, a pairing runtime PM
> usage counter decrement is needed to keep the counter balanced.
> 
> Also, call pm_runtime_disable() when register_flexcandev() returns an error
> code.
> 
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>

A patch has already been sent out to fix this issue:
https://www.spinics.net/lists/linux-can/msg03052.html

Reviewed-by: Joakim Zhang <qiangqing.zhang@....com>

Best Regards,
Joakim Zhang
> ---
>  drivers/net/can/flexcan.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index
> 94d10ec954a0..ea193426e5ae 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -1666,6 +1666,8 @@ static int flexcan_probe(struct platform_device
> *pdev)
>  	return 0;
> 
>   failed_register:
> +	pm_runtime_put_noidle(&pdev->dev);
> +	pm_runtime_disable(&pdev->dev);
>  	free_candev(dev);
>  	return err;
>  }
> --
> 2.17.1

Powered by blists - more mailing lists