diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2012-06-29 17:56:24 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-07-03 02:10:30 +0200 |
commit | 326cf0334bacfdf43039cf75997a022b9e51535d (patch) | |
tree | 568fc99ad9bdde8fa382ff6657568c2e2ec2e4fc /virt | |
parent | KVM: Add missing KVM_IRQFD API documentation (diff) | |
download | linux-326cf0334bacfdf43039cf75997a022b9e51535d.tar.xz linux-326cf0334bacfdf43039cf75997a022b9e51535d.zip |
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')
-rw-r--r-- | virt/kvm/eventfd.c | 3 |
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) 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); |