mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen/irq: handle IRQ being disabled while executing its handler
It's possible for IRQ_DISABLED to be set while running the handler
execution loop in do_IRQ(). Such disabling can be done by the handler
itself, or from a remote CPU.
Check for IRQ_DISABLED not being set in the loop condition, as to not
execute the handler if the IRQ has been disabled.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: b5edd9c58e
master date: 2026-06-29 17:14:47 +0200
This commit is contained in:
1 parent
ed9c50fb67
commit
cd5ee8e0d9
1 file changed
+3
-1
+3
-1
@@ -2074,7 +2074,9 @@ void do_IRQ(struct cpu_user_regs *regs)
|
||||
desc->status |= IRQ_INPROGRESS;
|
||||
|
||||
action = desc->action;
|
||||
while ( desc->status & IRQ_PENDING )
|
||||
|
||||
/* Deal with IRQ_DISABLED being set while inside the loop body. */
|
||||
while ( (desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING )
|
||||
{
|
||||
desc->status &= ~IRQ_PENDING;
|
||||
spin_unlock_irq(&desc->lock);
|
||||
|
||||