KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 12 May 2009 21:55:43 +0000 (18:55 -0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:54 +0000 (11:48 +0300)
commit7c8a83b75a38a807d37f5a4398eca2a42c8cf513
tree6d06eb065c6658c5058354cf7289428b495c909f
parent310b5d306c1aee7ebe32f702c0e33e7988d50646
KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock

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>
arch/x86/kvm/mmu.c
arch/x86/kvm/x86.c