All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andreslc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Gleb Natapov <gleb@kernel.org>,
	kvm@vger.kernel.org
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Subject: [PATCH] kvm: Fix kvm_get_page_retry_io __gup retval check
Date: Thu, 25 Sep 2014 15:26:50 -0700	[thread overview]
Message-ID: <1411684010-883-1-git-send-email-andreslc@google.com> (raw)

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


             reply	other threads:[~2014-09-25 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 22:26 Andres Lagar-Cavilla [this message]
2014-09-25 22:34 ` [PATCH] kvm: Fix kvm_get_page_retry_io __gup retval check Andrea Arcangeli
2014-09-26  8:22 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411684010-883-1-git-send-email-andreslc@google.com \
    --to=andreslc@google.com \
    --cc=aarcange@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.