From: Andres Lagar-Cavilla Date: Thu, 25 Sep 2014 22:26:50 +0000 (-0700) Subject: kvm: Fix kvm_get_page_retry_io __gup retval check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb0ca6acd466af55c95b7ce508f29e23a24cabd9;p=linux-beck.git kvm: Fix kvm_get_page_retry_io __gup retval check Confusion around -EBUSY and zero (inside a BUG_ON no less). Reported-by: Andrea Arcangeli Signed-off-by: Andres Lagar-Cavilla Signed-off-by: Paolo Bonzini --- diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3f16f569169e..a1cf53ee0d28 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1146,7 +1146,7 @@ int kvm_get_user_page_io(struct task_struct *tsk, struct mm_struct *mm, npages = __get_user_pages(tsk, mm, addr, 1, flags, pagep, NULL, &locked); if (!locked) { - VM_BUG_ON(npages != -EBUSY); + VM_BUG_ON(npages); if (!pagep) return 0;