mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +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> Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
This commit is contained in:
1 parent
ed39935f50
commit
b5edd9c58e
1 file changed
+3
-1
+3
-1
@@ -2088,7 +2088,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);
|
||||
|
||||