[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Avoid panic when adjusting sedf parameters



On 17/11/2011 13:30, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

>> +#define for_each_domain_in_cpupool(_d,_c)       \
>> + for ( (_d) = rcu_dereference(domain_list);     \
>> +       (_d) != NULL;                            \
>> +       (_d) = rcu_dereference((_d)->next_in_list )) \
> 
> Wouldn't this, up to here, simply be for_each_domain()?
> 
>> +       if ((_d)->cpupool == (_c))
> 
> This is dangerous - consider code like

I also wonder (and this is true for the existing open-coded versions too)
whether we have sufficient locking around use of d->cpupool? Do these loops
hold enough locks to ensure that d->cpupool doesn't change under their feet?

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.