mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
KVM: arm64: vgic: Free LPI vgic_irq structs in an RCU-safe manner
Free the vgic_irq structs in an RCU-safe manner to allow reads of the LPI configuration data to happen in parallel with the release of LPIs. Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20240221054253.3848076-8-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
This commit is contained in:
parent
05f4d4f5d4
commit
a5c7f011cb
@ -125,7 +125,7 @@ void __vgic_put_lpi_locked(struct kvm *kvm, struct vgic_irq *irq)
|
||||
xa_erase(&dist->lpi_xa, irq->intid);
|
||||
atomic_dec(&dist->lpi_count);
|
||||
|
||||
kfree(irq);
|
||||
kfree_rcu(irq, rcu);
|
||||
}
|
||||
|
||||
void vgic_put_irq(struct kvm *kvm, struct vgic_irq *irq)
|
||||
|
@ -117,6 +117,7 @@ struct irq_ops {
|
||||
|
||||
struct vgic_irq {
|
||||
raw_spinlock_t irq_lock; /* Protects the content of the struct */
|
||||
struct rcu_head rcu;
|
||||
struct list_head ap_list;
|
||||
|
||||
struct kvm_vcpu *vcpu; /* SGIs and PPIs: The VCPU
|
||||
|
Loading…
Reference in New Issue
Block a user