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: <6e155241-3403-49df-8f0d-5aa63e2e74ab@linux.intel.com>
Date: Tue, 15 Apr 2025 16:57:03 +0300
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: ende.tan@...rfivetech.com, linux-i2c@...r.kernel.org
Cc: andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com,
 jsd@...ihalf.com, andi.shyti@...nel.org, linux-kernel@...r.kernel.org,
 leyfoon.tan@...rfivetech.com, endeneer@...il.com
Subject: Re: [1/1] i2c: designware: Ensure runtime suspend is invoked during
 rapid slave unregistration and registration

Hi

On 4/12/25 5:33 AM, ende.tan@...rfivetech.com wrote:
> From: Tan En De <ende.tan@...rfivetech.com>
> 
> Replaced pm_runtime_put() with pm_runtime_put_sync_suspend() to ensure
> the runtime suspend is invoked immediately when unregistering a slave.
> This prevents a race condition where suspend was skipped when
> unregistering and registering slave in quick succession.
> 
> Signed-off-by: Tan En De <ende.tan@...rfivetech.com>
> ---
>   drivers/i2c/busses/i2c-designware-slave.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
> index 5cd4a5f7a472..b936a240db0a 100644
> --- a/drivers/i2c/busses/i2c-designware-slave.c
> +++ b/drivers/i2c/busses/i2c-designware-slave.c
> @@ -96,7 +96,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
>   	i2c_dw_disable(dev);
>   	synchronize_irq(dev->irq);
>   	dev->slave = NULL;
> -	pm_runtime_put(dev->dev);
> +	pm_runtime_put_sync_suspend(dev->dev);
>   
>   	return 0;
>   }

What kind of issue you are seeing?

I tried to test with no delay and 1 second delays between registering 
and unregistering. Power state was changing between D0 and D3 if there 
was delay between unregister and register but I could not see any issue.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ