]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: vgic: Rely on RCU protection in vgic_get_lpi()
authorOliver Upton <oliver.upton@linux.dev>
Wed, 21 Feb 2024 05:42:51 +0000 (05:42 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 23 Feb 2024 21:46:02 +0000 (21:46 +0000)
commit864d4304ec1e67b8235e2aae5d31bdad6dd8aa7c
treebf55aa60dc6826a50e069e30a4f0453799441bed
parenta5c7f011cb584a4713b3defc533ed55e237210a4
KVM: arm64: vgic: Rely on RCU protection in vgic_get_lpi()

Stop acquiring the lpi_list_lock in favor of RCU for protecting
the read-side critical section in vgic_get_lpi(). In order for this to
be safe, we also need to be careful not to take a reference on an irq
with a refcount of 0, as it is about to be freed.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240221054253.3848076-9-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic.c
arch/arm64/kvm/vgic/vgic.h