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:
Roger Pau Monne committed 2026-06-29 17:14:47 +02:00
1 parent ed39935f50
commit b5edd9c58e
1 file changed
+3 -1
+3 -1
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.