From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH] xen: domain_update_node_affinity: Correct the ASSERT Date: Fri, 25 Jul 2014 16:42:08 +0100 Message-ID: <53D296F002000078000261CD@mail.emea.novell.com> References: <1406302204-13992-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XAhdN-0005aQ-Op for xen-devel@lists.xenproject.org; Fri, 25 Jul 2014 15:42:13 +0000 In-Reply-To: <1406302204-13992-1-git-send-email-julien.grall@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Juergen Gross , Keir Fraser , ian.campbell@citrix.com, tim@xen.org, Dario Faggioli , Ian Jackson , George Dunlap , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 25.07.14 at 17:30, wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -449,7 +449,7 @@ void domain_update_node_affinity(struct domain *d) > } > /* Filter out non-online cpus */ > cpumask_and(dom_cpumask, dom_cpumask, online); > - ASSERT(!cpumask_empty(dom_cpumask)); > + ASSERT( !d->vcpu || !d->vcpu[0] || !cpumask_empty(dom_cpumask)); Wouldn't it be better for the function to bail early in that case? Jan