[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: Shall we clear the cpumap in XEN_DOMCTL_setvcpuaffinity
On 12/05/2010 08:22, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote: > When browse code, I noticed if the op->u.vcpuaffinity.cpumap is NULL, a random > value of new_affinity will be passed to vcpu_set_affinity(), as in followed > code. > > I'm not sure if this is expected result. IMO, we should return -EINVAL if no > cpu specified, as the return value at vcpu_set_affinity() for empty cpumap. Xen-unstable:21350. Thanks, Keir > Did I missed anything? > > case XEN_DOMCTL_getvcpuaffinity: > { > domid_t dom = op->domain; > struct domain *d = rcu_lock_domain_by_id(dom); > struct vcpu *v; > cpumask_t new_affinity; > ...... > if ( op->cmd == XEN_DOMCTL_setvcpuaffinity ) > { > xenctl_cpumap_to_cpumask( >>>>> the new_affinity is not > initialized for if cpumap==NULL > &new_affinity, &op->u.vcpuaffinity.cpumap); > ret = vcpu_set_affinity(v, &new_affinity); > } > > Thanks > --jyh _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |