aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-06-29 11:56:24 -0400
committerMarcelo Tosatti <mtosatti@redhat.com>2012-07-02 20:10:30 -0400
commit326cf0334bacfdf43039cf75997a022b9e51535d (patch)
tree568fc99ad9bdde8fa382ff6657568c2e2ec2e4fc /virt/kvm
parentf36992e31284131a978d07bb14e582ce67b46b64 (diff)
KVM: Sanitize KVM_IRQFD flags
We only know of one so far. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/eventfd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index c307c24c147a..7d7e2aaffece 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)
340int 340int
341kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) 341kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
342{ 342{
343 if (args->flags & ~KVM_IRQFD_FLAG_DEASSIGN)
344 return -EINVAL;
345
343 if (args->flags & KVM_IRQFD_FLAG_DEASSIGN) 346 if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
344 return kvm_irqfd_deassign(kvm, args); 347 return kvm_irqfd_deassign(kvm, args);
345 348