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: <ogqyyahwtd24ckvcqcdx2amm6uzxajeuya2p6555vjubjqtjtb@oqq4gxgwr5lu>
Date: Wed, 25 Sep 2024 16:02:03 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: michal.simek@....com, shubhraj@...inx.com, wsa@...nel.org, 
	robh@...nel.org, linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i2c: xiic: Fix pm_runtime_set_suspended() with runtime
 pm enabled

Hi Jinjie,

On Mon, Sep 23, 2024 at 11:42:50AM GMT, Jinjie Ruan wrote:
> It is not valid to call pm_runtime_set_suspended() for devices
> with runtime PM enabled because it returns -EAGAIN if it is enabled
> already and working. So, call pm_runtime_disable() before to fix it.
> 
> Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management")
> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
> ---
>  drivers/i2c/busses/i2c-xiic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index 4c89aad02451..1d68177241a6 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -1337,8 +1337,8 @@ static int xiic_i2c_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_pm_disable:
> -	pm_runtime_set_suspended(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
> +	pm_runtime_set_suspended(&pdev->dev);

Good catch Jinjie! Applied to i2c/i2c-host-fixes.

Thanks,
Andi

>  
>  	return ret;
>  }
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ