From: Ian Campbell Subject: Re: [PATCH v3 05/11] arm: shared_info page allocation and mapping Date: Wed, 14 Mar 2012 09:38:50 +0000 Message-ID: <1331717930.23971.341.camel@zakaz.uk.xensource.com> References: <1330698457-8622-5-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1330698457-8622-5-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 Cc: "xen-devel@lists.xensource.com" , David Vrabel , "Tim Deegan (3P)" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-03-02 at 14:27 +0000, Stefano Stabellini wrote: > @@ -118,7 +118,12 @@ static int create_p2m_entries(struct domain *d, > } > /* else: third already valid */ > > - BUG_ON(third[third_table_offset(addr)].p2m.valid); > + if ( third[third_table_offset(addr)].p2m.valid ) > + { > + /* p2m entry already present */ > + free_domheap_page( > + mfn_to_page(third[third_table_offset(addr)].p2m.base)); > + } If there was already an entry here don't we need to do something with whatever it points to? Either free it or deref or something? > > /* Allocate a new RAM page and attach */ > if (alloc)