From: Avi Kivity Date: Sun, 21 Oct 2007 09:03:36 +0000 (+0200) Subject: KVM: Add a might_sleep() annotation to gfn_to_page() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60395224d94945544f1f9dce5566981844bf0e77;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git KVM: Add a might_sleep() annotation to gfn_to_page() This will help trap accesses to guest memory in atomic context. Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index a6e3165043d..453e98e251d 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -993,6 +993,8 @@ struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn) struct page *page[1]; int npages; + might_sleep(); + gfn = unalias_gfn(kvm, gfn); slot = __gfn_to_memslot(kvm, gfn); if (!slot) {