George Dunlap writes ("[PATCH 6/8] tools/xenalyze: Fix off-by-one in MAX_CPUS 
range checks"):
> Skip action / throw error if cpu/vcpu >= MAX_CPUS  rather than >.
> 
> Also add an assertion to vcpu_find, to make future errors of this kind
> not out-of-bounds.
...
> +    /* "Graceful" handling of vid >= MAX_CPUS should be handled elsewhere */
> +    if ( vid >= MAX_CPUS ) {
> +        fprintf(stderr, "%s: vcpu %d exceeds MAX_CPUS %d!\n",
> +                __func__, vid, MAX_CPUS);
> +        error(ERR_ASSERT, NULL);
> +    }

I'm not convinced by the existence of error(ERR_ASSERT,...).  What is
wrong with assert() ?

If you agree that ERR_ASSERT should be got rid of, then you could
start here...

But:

Acked-by: Ian Jackson <ian.jack...@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to