From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] Avoid panic when adjusting sedf parameters Date: Thu, 17 Nov 2011 13:48:36 +0000 Message-ID: References: <4EC51A8D0200007800061933@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4EC51A8D0200007800061933@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Juergen Gross Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 17/11/2011 13:30, "Jan Beulich" 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