From 8ef7e26975544e0acce75610be8a372e5f5c4931 Mon Sep 17 00:00:00 2001 From: Damien Zammit via Bug reports for the GNU Hurd Date: Sat, 23 Nov 2024 22:20:32 +0000 Subject: device/intr: Account for interrupts that could not be delivered When an irq handler dies, we are decrementing the n_unacked count and calling __enable_irq() the right number of times, but we need to decrement the total interrupt count by the number that were lost and also clear that number. This fixes a hang when a shared irq handler quits and leaves some unacked interrupts. Message-ID: <20241123222020.245519-1-damien@zamaudio.com> --- device/intr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device/intr.c b/device/intr.c index 9035c036..0d13acf7 100644 --- a/device/intr.c +++ b/device/intr.c @@ -307,6 +307,10 @@ intr_thread (void) e->n_unacked--; } + /* Account for all interrupts that could not be delivered */ + irqtab.tot_num_intr -= e->interrupts; + e->interrupts = 0; + #if 0 #ifndef LINUX_DEV // TODO: remove from the action list -- cgit v1.2.3