diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2023-04-12 06:27:33 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-11 23:03:03 +0900 |
commit | 5bd77c2393393a5003dc831d17a7adc2fc005f8e (patch) | |
tree | 6ceb385fad212218283907c3a1d9ad3a29a357f8 /kernel | |
parent | 569f33c3c2f9f3ab17e64abf9fa6472697058648 (diff) | |
download | linux-5bd77c2393393a5003dc831d17a7adc2fc005f8e.tar.gz |
KVM: arm64: vgic: Don't acquire its_lock before config_lock
commit 49e5d16b6fc003407a33a9961b4bcbb970bd1c76 upstream. commit f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") was meant to rectify a longstanding lock ordering issue in KVM where the kvm->lock is taken while holding vcpu->mutex. As it so happens, the aforementioned commit introduced yet another locking issue by acquiring the its_lock before acquiring the config lock. This is obviously wrong, especially considering that the lock ordering is well documented in vgic.c. Reshuffle the locks once more to take the config_lock before the its_lock. While at it, sprinkle in the lockdep hinting that has become popular as of late to keep lockdep apprised of our ordering. Cc: stable@vger.kernel.org Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230412062733.988229-1-oliver.upton@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions