From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: Don't call init_domheap_page with an empty range Date: Wed, 13 Nov 2013 12:59:05 +0000 Message-ID: <52837799.8050704@linaro.org> References: <1384292575-2094-1-git-send-email-julien.grall@linaro.org> <1384339550.5406.47.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vga3F-0004WG-Lf for xen-devel@lists.xenproject.org; Wed, 13 Nov 2013 13:00:09 +0000 Received: by mail-ea0-f178.google.com with SMTP id a10so183606eae.9 for ; Wed, 13 Nov 2013 04:59:07 -0800 (PST) In-Reply-To: <1384339550.5406.47.camel@kazak.uk.xensource.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: Ian Campbell Cc: xen-devel@lists.xenproject.org, Keir Fraser , stefano.stabellini@eu.citrix.com, tim@xen.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 11/13/2013 10:45 AM, Ian Campbell wrote: > On Tue, 2013-11-12 at 21:42 +0000, Julien Grall wrote: >> 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_page 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. > > init_xenheap_pages starts with "if (pe<=ps) return". I think > init_domheap_pages usefully do the same. Actually, init_domheap_pages doesn't contain this fix. I will rework this patch to move the check in this function. -- Julien Grall