Skip to content

Commit

Permalink
kvm: Fix kvm_get_page_retry_io __gup retval check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andres Lagar-Cavilla authored and Paolo Bonzini committed Sep 26, 2014
1 parent 00c027d commit bb0ca6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bb0ca6a

Please sign in to comment.