提交 bb0ca6ac 编写于 作者: A Andres Lagar-Cavilla 提交者: Paolo Bonzini

kvm: Fix kvm_get_page_retry_io __gup retval check

Confusion around -EBUSY and zero (inside a BUG_ON no less).
Reported-by: NAndrea Arcangeli <aarcange@redhat.com>
Signed-off-by: NAndres Lagar-Cavilla <andreslc@google.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 00c027db
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册