genirq: Report pending state for disabled IRQs
PATCH 1/1 genirq: Report pending state for disabled IRQs
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 <[email protected]>
---
kernel/irq/irq_sim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/irq/irq_sim.c +1 -2
@@ -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
Signature · 1 line
2.53.0