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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeXmcl4ngEm1RccW@hovoldconsulting.com>
Date: Mon, 4 Mar 2024 16:19:14 +0100
From: Johan Hovold <johan@...nel.org>
To: Qingliang Li <qingliang.li@...iatek.com>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@....cz>,
	Len Brown <len.brown@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Johan Hovold <johan+linaro@...nel.org>,
	Tony Lindgren <tony@...mide.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, Dhruva Gole <d-gole@...com>
Subject: Re: [PATCH v2] PM: sleep: wakeirq: fix wake irq warning in system
 suspend

On Fri, Mar 01, 2024 at 05:26:57PM +0800, Qingliang Li wrote:
> When driver uses pm_runtime_force_suspend() as the system suspend callback
> function and registers the wake irq with reverse enable ordering, the wake
> irq will be re-enabled when entering system suspend, triggering an
> 'Unbalanced enable for IRQ xxx' warning. In this scenario, the call
> sequence during system suspend is as follows:
>   suspend_devices_and_enter()
>     -> dpm_suspend_start()
>       -> dpm_run_callback()
>         -> pm_runtime_force_suspend()
>           -> dev_pm_enable_wake_irq_check()
>           -> dev_pm_enable_wake_irq_complete()
> 
>     -> suspend_enter()
>       -> dpm_suspend_noirq()
>         -> device_wakeup_arm_wake_irqs()
>           -> dev_pm_arm_wake_irq()
> 
> To fix this issue, complete the setting of WAKE_IRQ_DEDICATED_ENABLED flag
> in dev_pm_enable_wake_irq_complete() to avoid redundant irq enablement.
> 
> Reviewed-by: Dhruva Gole <d-gole@...com>
> Signed-off-by: Qingliang Li <qingliang.li@...iatek.com>

Thanks for the fix. Looks correct to me:

Reviewed-by: Johan Hovold <johan+linaro@...nel.org>

I think you should add back the Fixes tag from v1 and CC stable as well:

Fixes: 8527beb12087 ("PM: sleep: wakeirq: fix wake irq arming")
Cc: stable@...r.kernel.org      # 5.16

Note that WAKE_IRQ_DEDICATED_REVERSE was added in 5.16 by commit
259714100d98 ("PM / wakeirq: support enabling wake-up irq after
runtime_suspend called") so no need to try to backport any further than
that.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ