Re: [PATCH v2] KVM: arm64: Fix circular locking dependency

From: Marc Zyngier
Date: Tue Jan 30 2024 - 16:40:57 EST


On Wed, 24 Jan 2024 09:10:28 +0000, Sebastian Ene wrote:
> The rule inside kvm enforces that the vcpu->mutex is taken *inside*
> kvm->lock. The rule is violated by the pkvm_create_hyp_vm() which acquires
> the kvm->lock while already holding the vcpu->mutex lock from
> kvm_vcpu_ioctl(). Avoid the circular locking dependency altogether by
> protecting the hyp vm handle with the config_lock, much like we already
> do for other forms of VM-scoped data.

Applied to fixes, thanks!

[1/1] KVM: arm64: Fix circular locking dependency
commit: 10c02aad111df02088d1a81792a709f6a7eca6cc

Cheers,

M.
--
Without deviation from the norm, progress is not possible.