From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH V3] xen: Check if the range is valid in init_domheap_pages Date: Wed, 13 Nov 2013 14:58:20 +0000 Message-ID: References: <1384349870-4256-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vgbto-00017a-Qj for xen-devel@lists.xenproject.org; Wed, 13 Nov 2013 14:58:33 +0000 Received: by mail-bk0-f52.google.com with SMTP id u14so254945bkz.39 for ; Wed, 13 Nov 2013 06:58:31 -0800 (PST) In-Reply-To: <1384349870-4256-1-git-send-email-julien.grall@linaro.org> 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 , xen-devel@lists.xenproject.org Cc: patches@linaro.org, tim@xen.org, ian.campbell@citrix.com, Jan Beulich , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 13/11/2013 13:37, "Julien Grall" wrote: > On ARM, when an initrd is given to xen by U-boot, it will reserve the memory > in > the device tree. > In this case, when xen decides to free unused memory, dt_unreserved_regions > will call init_domheap_pages with the start and the end of range equals. But > the latter assumes that (start > end), if not Xen will hang because the > number of pages is equals to (unsigned)-1. > > Signed-off-by: Julien Grall > CC: Keir Fraser > CC: Jan Beulich I understand Jan's reservations, but I think just being more liberal here is fine really. Acked-by: Keir Fraser