提交 326cf033 编写于 作者: A Alex Williamson 提交者: Marcelo Tosatti

KVM: Sanitize KVM_IRQFD flags

We only know of one so far.
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
上级 f36992e3
...@@ -340,6 +340,9 @@ kvm_irqfd_deassign(struct kvm *kvm, struct kvm_irqfd *args) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册