From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen: domain_update_node_affinity: Correct the ASSERT Date: Fri, 25 Jul 2014 16:44:09 +0100 Message-ID: <53D27B49.70309@linaro.org> References: <1406302204-13992-1-git-send-email-julien.grall@linaro.org> <53D296F002000078000261CD@mail.emea.novell.com> 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 1XAhfM-0005wV-2B for xen-devel@lists.xenproject.org; Fri, 25 Jul 2014 15:44:16 +0000 Received: by mail-wg0-f44.google.com with SMTP id m15so4381951wgh.15 for ; Fri, 25 Jul 2014 08:44:14 -0700 (PDT) In-Reply-To: <53D296F002000078000261CD@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich 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 Hi Jan, On 07/25/2014 04:42 PM, Jan Beulich wrote: >>>> 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? I've no idea. I mostly followed the advice on this thread: http://www.gossamer-threads.com/lists/xen/devel/340233 Regards, -- Julien Grall