Skip to content

Commit

Permalink
KVM: Sanitize KVM_IRQFD flags
Browse files Browse the repository at this point in the history
We only know of one so far.

Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
awilliam authored and matosatti committed Jul 3, 2012
1 parent f36992e commit 326cf03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virt/kvm/eventfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 326cf03

Please sign in to comment.