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
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.
kvmarm mailing list