From: Ian Campbell Subject: Re: [PATCH] xen: arm: do not BUG on guest paddrs which are very high Date: Fri, 6 Dec 2013 17:05:05 +0000 Message-ID: <1386349505.25188.7.camel@kazak.uk.xensource.com> References: <1386248008-10820-1-git-send-email-ian.campbell@citrix.com> <52A1F5DB.5060005@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52A1F5DB.5060005@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 Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2013-12-06 at 16:05 +0000, Julien Grall wrote: > > @@ -80,6 +81,8 @@ paddr_t p2m_lookup(struct domain *d, paddr_t paddr) > > spin_lock(&p2m->lock); > > > > first = p2m_map_first(p2m, paddr); > > + if ( !first ) > > + goto done; > > If you jump to done, you will use pte which is uninitialized. Unlock the > spinlock should be enough here. True. I wonder why the compiler didn't warn me about that, it's the sort of thing it normally spots.