From: Alex Williamson <alex.williamson@redhat.com>
To: avi@redhat.com, mst@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
jan.kiszka@siemens.com, cornelia.huck@de.ibm.com
Subject: [PATCH v3 3/3] kvm: Sanitize KVM_IRQFD flags
Date: Fri, 29 Jun 2012 09:56:24 -0600 [thread overview]
Message-ID: <20120629155622.30535.24831.stgit@bling.home> (raw)
In-Reply-To: <20120629154940.30535.17132.stgit@bling.home>
We only know of one so far.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
virt/kvm/eventfd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index c307c24..7d7e2aa 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -340,6 +340,9 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd *args)
int
kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
{
+ if (args->flags & ~KVM_IRQFD_FLAG_DEASSIGN)
+ return -EINVAL;
+
if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
return kvm_irqfd_deassign(kvm, args);
next prev parent reply other threads:[~2012-06-29 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 15:56 [PATCH v3 0/3] kvm: KVM_IRQFD cleanup, docs, sanitize flags Alex Williamson
2012-06-29 15:56 ` [PATCH v3 1/3] kvm: Pass kvm_irqfd to functions Alex Williamson
2012-06-29 15:56 ` [PATCH v3 2/3] kvm: Add missing KVM_IRQFD API documentation Alex Williamson
2012-06-29 15:56 ` Alex Williamson [this message]
2012-07-01 8:26 ` [PATCH v3 3/3] kvm: Sanitize KVM_IRQFD flags Michael S. Tsirkin
2012-07-02 15:49 ` Alex Williamson
2012-07-02 15:51 ` [PATCH v3 0/3] kvm: KVM_IRQFD cleanup, docs, sanitize flags Alex Williamson
2012-07-02 15:52 ` Avi Kivity
2012-07-03 0:10 ` Marcelo Tosatti
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=20120629155622.30535.24831.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox