From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v6 2/2] xen/arm: support gzip compressed kernels Date: Tue, 22 Sep 2015 10:08:39 +0100 Message-ID: <56011A97.5050304@citrix.com> References: <1442875893-21974-2-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442875893-21974-2-git-send-email-stefano.stabellini@eu.citrix.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: Stefano Stabellini , xen-devel@lists.xensource.com Cc: Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 21/09/2015 23:51, Stefano Stabellini wrote: > + /* > + * Need to free pages after output_size here because they won't be > + * freed by discard_initial_modules > + */ > + i = (output_size + PAGE_SIZE - 1) >> PAGE_SHIFT; > + for ( ; i < (1 << kernel_order_out); i++ ) > + free_domheap_page(pages + i); > + > + vunmap(output); > + I forgot to mention that vunmap should be called before free_domheap_pages to avoid mapping on unallocated pages. Regards, -- Julien Grall