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: <aB4aUAVONloIK0E0@smile.fi.intel.com>
Date: Fri, 9 May 2025 18:08:00 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Francesco Dolcini <francesco@...cini.it>
Cc: Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	Emanuele Ghidoli <emanuele.ghidoli@...adex.com>,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Marek Vasut <marek.vasut@...il.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>, stable@...r.kernel.org,
	Francesco Dolcini <francesco.dolcini@...adex.com>
Subject: Re: [PATCH v2] gpio: pca953x: fix IRQ storm on system wake up

On Fri, May 09, 2025 at 04:18:28PM +0200, Francesco Dolcini wrote:
> From: Emanuele Ghidoli <emanuele.ghidoli@...adex.com>
> 
> If an input changes state during wake-up and is used as an interrupt
> source, the IRQ handler reads the volatile input register to clear the
> interrupt mask and deassert the IRQ line. However, the IRQ handler is
> triggered before access to the register is granted, causing the read
> operation to fail.
> 
> As a result, the IRQ handler enters a loop, repeatedly printing the
> "failed reading register" message, until `pca953x_resume` is eventually

`pca953x_resume` --> pca953x_resume()

> called, which restores the driver context and enables access to
> registers.
> 
> Fix by disabling the IRQ line before entering suspend mode, and
> re-enabling it after the driver context is restored in `pca953x_resume`.

`pca953x_resume` --> pca953x_resume()

> An irq can be disabled with disable_irq() and still wake the system as

IRQ

> long as the irq has wake enabled, so the wake-up functionality is

IRQ

> preserved.

With above fixed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
thanks!

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ