From: Marcelo Tosatti Date: Tue, 8 Sep 2009 17:47:38 +0000 (-0300) Subject: KVM: SVM: remove needless mmap_sem acquision from nested_svm_map X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8b3433a5c062e94e34cadb6144c10689a497bc3;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git KVM: SVM: remove needless mmap_sem acquision from nested_svm_map nested_svm_map unnecessarily takes mmap_sem around gfn_to_page, since gfn_to_page / get_user_pages are responsible for it. Signed-off-by: Marcelo Tosatti Acked-by: Alexander Graf Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 92048a626d4e..f54c4f9d2865 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1396,10 +1396,7 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, enum km_type idx) { struct page *page; - down_read(¤t->mm->mmap_sem); page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT); - up_read(¤t->mm->mmap_sem); - if (is_error_page(page)) goto error;