[XEN] physdev: Check for negative irqs in alloc_irq_vector.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-08-30 18:02:32 +01:00
1 parent c398044d5d
commit 4a83022207
1 file changed
+3 -2
+3 -2
View File
@@ -96,10 +96,11 @@ long do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
if ( !IS_PRIV(current->domain) )
break;
irq = irq_op.irq;
ret = -EINVAL;
if ( (irq = irq_op.irq) >= NR_IRQS )
if ( (irq < 0) || (irq >= NR_IRQS) )
break;
irq_op.vector = assign_irq_vector(irq);
ret = copy_to_guest(arg, &irq_op, 1) ? -EFAULT : 0;
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.