]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: SVM: Annotate nested_svm_map with might_sleep()
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 19 Feb 2010 15:23:04 +0000 (16:23 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:34:16 +0000 (12:34 +0300)
The nested_svm_map() function can sleep and must not be
called from atomic context. So annotate that function.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c

index 02f8d491d15adc94bab18b1e63076a61c49f7ac4..4bc018333d76a118175ab35f9b6d5fd304e83119 100644 (file)
@@ -1434,6 +1434,8 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, struct page **_page)
 {
        struct page *page;
 
+       might_sleep();
+
        page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT);
        if (is_error_page(page))
                goto error;