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: <20210102004352.z5yh3i25bftnx7ap@earth.universe>
Date:   Sat, 2 Jan 2021 01:43:52 +0100
From:   Sebastian Reichel <sre@...nel.org>
To:     Zhang Qilong <zhangqilong3@...wei.com>
Cc:     gustavoars@...nel.org, carlos.chinea@...ia.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HSI: Fix PM usage counter unbalance in ssi_hw_init

Hi,

On Mon, Nov 23, 2020 at 06:18:27PM +0800, Zhang Qilong wrote:
> pm_runtime_get_sync will increment pm usage counter
> even it failed. Forgetting to putting operation will
> result in reference leak here. We fix it by replacing
> it with pm_runtime_resume_and_get to keep usage counter
> balanced.
> 
> Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@...wei.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/hsi/controllers/omap_ssi_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
> index fa69b94debd9..b4ac2f8cb9f9 100644
> --- a/drivers/hsi/controllers/omap_ssi_core.c
> +++ b/drivers/hsi/controllers/omap_ssi_core.c
> @@ -424,7 +424,7 @@ static int ssi_hw_init(struct hsi_controller *ssi)
>  	struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi);
>  	int err;
>  
> -	err = pm_runtime_get_sync(ssi->device.parent);
> +	err = pm_runtime_resume_and_get(ssi->device.parent);
>  	if (err < 0) {
>  		dev_err(&ssi->device, "runtime PM failed %d\n", err);
>  		return err;
> -- 
> 2.25.4
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ