瀏覽代碼

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>
Andres Lagar-Cavilla 11 年之前
父節點
當前提交
bb0ca6acd4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      virt/kvm/kvm_main.c

+ 1 - 1
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;