Skip to content

Commit 6c84ff2

Browse files
Tomas Krckagregkh
authored andcommitted
irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity()
commit 35cb2c6 upstream. The following call-chain leads to enabling interrupts in a nested interrupt disabled section: irq_set_vcpu_affinity() irq_get_desc_lock() raw_spin_lock_irqsave() <--- Disable interrupts its_irq_set_vcpu_affinity() guard(raw_spinlock_irq) <--- Enables interrupts when leaving the guard() irq_put_desc_unlock() <--- Warns because interrupts are enabled This was broken in commit b97e8a2, which replaced the original raw_spin_[un]lock() pair with guard(raw_spinlock_irq). Fix the issue by using guard(raw_spinlock). [ tglx: Massaged change log ] Fixes: b97e8a2 ("irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()") Signed-off-by: Tomas Krcka <krckatom@amazon.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20241230150825.62894-1-krckatom@amazon.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 61c684d commit 6c84ff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
19701970
if (!is_v4(its_dev->its))
19711971
return -EINVAL;
19721972

1973-
guard(raw_spinlock_irq)(&its_dev->event_map.vlpi_lock);
1973+
guard(raw_spinlock)(&its_dev->event_map.vlpi_lock);
19741974

19751975
/* Unmap request? */
19761976
if (!info)

0 commit comments

Comments
 (0)