mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] genirq: Report pending state for disabled IRQs
@ 2026-10-31 19:57 Avi Weiss
  0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-31 19:57 UTC (permalink / raw)
  To: tglx; +Cc: radu, linux-kernel, Avi Weiss

irq_sim_get_irqchip_state() returns success without updating the
output argument when the simulated IRQ is disabled. This leaves
callers with the previous value rather than the pending state.

Read the pending bitmap regardless of whether the IRQ is enabled.

Fixes: 337cbeb2c13e ("genirq/irq_sim: Simplify the API")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---

 kernel/irq/irq_sim.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c
index 44747754530d..176100c074f8 100644
--- a/kernel/irq/irq_sim.c
+++ b/kernel/irq/irq_sim.c
@@ -58,8 +58,7 @@ static int irq_sim_get_irqchip_state(struct irq_data *data,
 
 	switch (which) {
 	case IRQCHIP_STATE_PENDING:
-		if (irq_ctx->enabled)
-			*state = test_bit(hwirq, irq_ctx->work_ctx->pending);
+		*state = test_bit(hwirq, irq_ctx->work_ctx->pending);
 		break;
 	default:
 		return -EINVAL;

base-commit: e9954f3fbddd25e1a01b7e5a0b72fb8b564204e0
-- 
2.53.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-31 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 19:57 [PATCH] genirq: Report pending state for disabled IRQs Avi Weiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®