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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250718101727.776611a0@akair>
Date: Fri, 18 Jul 2025 10:17:27 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: vigneshr@...com, aaro.koskinen@....fi, khilman@...libre.com,
 rogerq@...nel.org, tony@...mide.com, jmkrzyszt@...il.com,
 andi.shyti@...nel.org, miaoqinglang@...wei.com, grygorii.strashko@...com,
 wsa@...nel.org, linux-omap@...r.kernel.org, linux-i2c@...r.kernel.org,
 linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] i2c: omap: Fix an error handling path in
 omap_i2c_probe()

Am Sat,  5 Jul 2025 09:57:38 +0200
schrieb Christophe JAILLET <christophe.jaillet@...adoo.fr>:

> If an error occurs after pm_runtime_use_autosuspend(), a corresponding
> pm_runtime_dont_use_autosuspend() should be called.
> 
> In case of error in pm_runtime_resume_and_get(), it is not the case because
> the error handling path is wrongly ordered.
> Fix it.
> 
> Fixes: 780f62974125 ("i2c: omap: fix reference leak when pm_runtime_get_sync fails")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Reviewed-by: Andreas Kemnade <andreas@...nade.info>

> ---
> Compile tested only.
> ---
>  drivers/i2c/busses/i2c-omap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 485313d872e5..ef1193e0e62d 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1523,9 +1523,9 @@ omap_i2c_probe(struct platform_device *pdev)
>  	if (omap->mux_state)
>  		mux_state_deselect(omap->mux_state);
>  err_put_pm:
> -	pm_runtime_dont_use_autosuspend(omap->dev);
>  	pm_runtime_put_sync(omap->dev);
>  err_disable_pm:
> +	pm_runtime_dont_use_autosuspend(omap->dev);
>  	pm_runtime_disable(&pdev->dev);
>  
>  	return r;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ