diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2024-02-21 06:42:50 +0100 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2024-02-23 22:46:02 +0100 |
commit | a5c7f011cb584a4713b3defc533ed55e237210a4 (patch) | |
tree | 56ea312c5bb35e820cdd8fa1fc76abdc4d36be8c /arch/arm64/kvm/vgic | |
parent | KVM: arm64: vgic: Use atomics to count LPIs (diff) | |
download | linux-a5c7f011cb584a4713b3defc533ed55e237210a4.tar.xz linux-a5c7f011cb584a4713b3defc533ed55e237210a4.zip |
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>
Diffstat (limited to 'arch/arm64/kvm/vgic')
-rw-r--r-- | arch/arm64/kvm/vgic/vgic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c index 15dbd17b3a9e..3fedc58e663a 100644 --- a/arch/arm64/kvm/vgic/vgic.c +++ b/arch/arm64/kvm/vgic/vgic.c @@ -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) |