]> git.karo-electronics.de Git - linux-beck.git/commit
KVM: hyperv: fix locking of struct kvm_hv fields
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Dec 2016 09:12:53 +0000 (10:12 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Dec 2016 16:53:38 +0000 (17:53 +0100)
commit3f5ad8be3713572f3946b69eb376206153d0ea2d
tree90ca8a72bf9fd7fc79652a8c772f00ae32574606
parent83781d180b219bd079ae72b341ee3f21fb236e97
KVM: hyperv: fix locking of struct kvm_hv fields

Introduce a new mutex to avoid an AB-BA deadlock between kvm->lock and
vcpu->mutex.  Protect accesses in kvm_hv_setup_tsc_page too, as suggested
by Roman.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virtual/kvm/locking.txt
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/hyperv.c
arch/x86/kvm/x86.c