debuggers.hg
changeset 3546:ba0bfd97ed0f
bitkeeper revision 1.1159.212.31 (41f52831-7xkHV9BTxL0wcBF2Ad-aQ)
Added a minor amount of hypercall argument validation to do_boot_vcpu()
Signed-off-by: michael.fetterman@cl.cam.ac.uk
Added a minor amount of hypercall argument validation to do_boot_vcpu()
Signed-off-by: michael.fetterman@cl.cam.ac.uk
author | mafetter@fleming.research |
---|---|
date | Mon Jan 24 16:54:09 2005 +0000 (2005-01-24) |
parents | 6b76ae4b9ea7 |
children | ee14f9496f5b |
files | xen/common/domain.c |
line diff
1.1 --- a/xen/common/domain.c Mon Jan 24 16:47:08 2005 +0000 1.2 +++ b/xen/common/domain.c Mon Jan 24 16:54:09 2005 +0000 1.3 @@ -305,8 +305,8 @@ long do_boot_vcpu(unsigned long vcpu, fu 1.4 int rc = 0; 1.5 full_execution_context_t *c; 1.6 1.7 - if ( d->exec_domain[vcpu] != NULL ) 1.8 - return EINVAL; 1.9 + if ( (vcpu >= MAX_VIRT_CPUS) || (d->exec_domain[vcpu] != NULL) ) 1.10 + return -EINVAL; 1.11 1.12 if ( alloc_exec_domain_struct(d, vcpu) == NULL ) 1.13 return -ENOMEM;