public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: Fix kvm_get_page_retry_io __gup retval check
@ 2014-09-25 22:26 Andres Lagar-Cavilla
  2014-09-25 22:34 ` Andrea Arcangeli
  2014-09-26  8:22 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Andres Lagar-Cavilla @ 2014-09-25 22:26 UTC (permalink / raw)
  To: Paolo Bonzini, Andrea Arcangeli, Gleb Natapov, kvm; +Cc: Andres Lagar-Cavilla

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>
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.1.0.rc2.206.gedb03e5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-26  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 22:26 [PATCH] kvm: Fix kvm_get_page_retry_io __gup retval check Andres Lagar-Cavilla
2014-09-25 22:34 ` Andrea Arcangeli
2014-09-26  8:22 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox