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>
This commit is contained in:
parent
f36992e312
commit
326cf0334b
1 changed files with 3 additions and 0 deletions
|
@ -340,6 +340,9 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||||
int
|
int
|
||||||
kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
|
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)
|
if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
|
||||||
return kvm_irqfd_deassign(kvm, args);
|
return kvm_irqfd_deassign(kvm, args);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue