[PATCH] KVM: arm/arm64: VGIC MMIO: add missing irq_lock

Andre Przywara andre.przywara at arm.com
Tue Mar 6 03:49:06 PST 2018


Hi,

On 06/03/18 09:21, Andre Przywara wrote:
> Our irq_is_pending() helper function accesses multiple members of the
> vgic_irq struct, so we need to hold the lock when calling it.
> Add that requirement as a comment to the definition and take the lock
> around the call in vgic_mmio_read_pending(), where we were missing it
> before.

for the records and since Marc asked for it:
Currently we have the following users of irq_is_pending():
- vgic_v2_populate_lr(): The irq_lock must be held by the caller.
- vgic_v3_populate_lr(): The irq_lock must be held by the caller.
- vgic_irq_cmp(): locks are taken around the call
- kvm_vgic_vcpu_pending_irq(): lock are taken around the call
- vgic_target_oracle(): The irq_lock must be held by the caller

So vgic_mmio_read_pending() is the only instance right now where we
don't get the lock.

Cheers,
Andre.



More information about the linux-arm-kernel mailing list