diff options
author | Andres Lagar-Cavilla <andreslc@google.com> | 2014-09-25 15:26:50 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-26 10:21:29 +0200 |
commit | bb0ca6acd466af55c95b7ce508f29e23a24cabd9 (patch) | |
tree | 99f2d6b8963f869e35a1be940183f77d939c5bb8 | |
parent | 00c027db0cc4b7387b258330482c6e5f5e836b18 (diff) | |
download | op-kernel-dev-bb0ca6acd466af55c95b7ce508f29e23a24cabd9.zip op-kernel-dev-bb0ca6acd466af55c95b7ce508f29e23a24cabd9.tar.gz |
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 <aarcange@redhat.com>
Signed-off-by: Andres Lagar-Cavilla <andreslc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3f16f56..a1cf53e 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; |