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-next>] [day] [month] [year] [list]
Message-Id: <20240608163620.89028-1-luuiiruo@163.com>
Date: Sun,  9 Jun 2024 00:36:20 +0800
From: Zhenze Zhuang <luuiiruo@....com>
To: tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org,
	Zhenze Zhuang <luuiiruo@....com>
Subject: [PATCH] genirq: Fix gpio irq will fail to be resend under certain conditions

When a gpio irq is disable and the wakeup function is enable, and
the device enters suspend, the irq wakeup is triggered but then enters
suspend, the IRQS_REPLAY flag will be set, but the IRQS_REPLAY will
not be cleared because the irq_may_run() condition is not met. After
the gpio irq is enabled and the suspend is entered again, after the
gpio irq is triggered, the check_irq_resend() execution will fail
because the IRQS_REPLAY is asserted, resulting in the interrupt not
being resned.

Signed-off-by: Zhenze Zhuang <luuiiruo@....com>
---
 kernel/irq/chip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc94e0bf2c94..8800db8d655c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -690,6 +690,8 @@ void handle_fasteoi_irq(struct irq_desc *desc)
 
 	raw_spin_lock(&desc->lock);
 
+	desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
+
 	/*
 	 * When an affinity change races with IRQ handling, the next interrupt
 	 * can arrive on the new CPU before the original CPU has completed
@@ -701,8 +703,6 @@ void handle_fasteoi_irq(struct irq_desc *desc)
 		goto out;
 	}
 
-	desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-
 	/*
 	 * If its disabled or no action available
 	 * then mask it and get out of here:
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ