]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: vgic-its: Add error handling in vgic_its_cache_translation
authorKeisuke Nishimura <keisuke.nishimura@inria.fr>
Sat, 30 Nov 2024 14:49:53 +0000 (15:49 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 4 Dec 2024 00:22:10 +0000 (16:22 -0800)
commitbe7e611274224b23776469d7f7ce50e25ac53142
tree0a9db03a68ccd2cbe157252f43cd56959e7fb56a
parent03c7527e97f73081633d773f9f8c2373f9854b25
KVM: arm64: vgic-its: Add error handling in vgic_its_cache_translation

The return value of xa_store() needs to be checked. This fix adds an
error handling path that resolves the kref inconsistency on failure. As
suggested by Oliver Upton, this function does not return the error code
intentionally because the translation cache is best effort.

Fixes: 8201d1028caa ("KVM: arm64: vgic-its: Maintain a translation cache per ITS")
Signed-off-by: Keisuke Nishimura <keisuke.nishimura@inria.fr>
Suggested-by: Oliver Upton <oliver.upton@linux.dev>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241130144952.23729-1-keisuke.nishimura@inria.fr
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-its.c