KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock
commit529fcfcdbe644664b02ce292f2c1628592ff07d2
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 3 Aug 2009 17:57:50 +0000 (3 14:57 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:28 +0000 (8 20:33 -0700)
tree89f1671249232105f0fffbaecf87f0cdb42826de
parent8d31fceee486d4f75ece5efcb02f53ffd25e1513
KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock

(cherry picked from commit 7c8a83b75a38a807d37f5a4398eca2a42c8cf513)

kvm_handle_hva, called by MMU notifiers, manipulates mmu data only with
the protection of mmu_lock.

Update kvm_mmu_change_mmu_pages callers to take mmu_lock, thus protecting
against kvm_handle_hva.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c