linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jan H. Schönherr" <jschoenh@amazon.de>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>
Cc: "Jan H. Schönherr" <jschoenh@amazon.de>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	sachinp@linux.vnet.ibm.com,
	"Abdul Haleem" <abdhalee@linux.vnet.ibm.com>,
	kvm@vger.kernel.org
Subject: [PATCH] Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD"
Date: Sat, 16 Sep 2017 22:12:24 +0200	[thread overview]
Message-ID: <1505592744-31498-1-git-send-email-jschoenh@amazon.de> (raw)
In-Reply-To: <04cde7c8-d41f-96e2-2b4b-2287b8f04bfc@amazon.de>

This reverts commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563.

The commit broke compilation on !CONFIG_HAVE_KVM_IRQ_ROUTING. Also,
there may be cases with CONFIG_HAVE_KVM_IRQ_ROUTING, where larger
gsi values make sense.

As the commit was meant as an early indicator to user space that
something is wrong, reverting just restores the previous behavior
where overly large values are ignored when encountered (without
any direct feedback).

Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
---
 virt/kvm/eventfd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index c608ab4..f2ac53a 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -565,8 +565,6 @@ kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
 {
 	if (args->flags & ~(KVM_IRQFD_FLAG_DEASSIGN | KVM_IRQFD_FLAG_RESAMPLE))
 		return -EINVAL;
-	if (args->gsi >= KVM_MAX_IRQ_ROUTES)
-		return -EINVAL;
 
 	if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
 		return kvm_irqfd_deassign(kvm, args);
-- 
2.3.1.dirty

  reply	other threads:[~2017-09-16 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-16 16:24 [mainline][bisected 36ae3c0] Build fail at virt/kvm/eventfd.c:568 Abdul Haleem
2017-09-16 17:46 ` Jan H. Schönherr
2017-09-16 20:12   ` Jan H. Schönherr [this message]
2017-09-18  6:44     ` [PATCH] Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD" Michael Ellerman
2017-09-18  8:11       ` Paolo Bonzini
2017-09-18 12:21     ` David Hildenbrand
2017-09-20  1:31 ` [PATCH] KVM: KVM_MAX_IRQ_ROUTES only defined with CONFIG_HAVE_KVM_IRQ_ROUTING Daniel Black
2017-09-20  5:05   ` Daniel Black

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=1505592744-31498-1-git-send-email-jschoenh@amazon.de \
    --to=jschoenh@amazon.de \
    --cc=abdhalee@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=sachinp@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).