From: Tim Deegan Subject: Re: shadow2 corrupting PV guest state Date: Mon, 23 Oct 2006 13:42:19 +0100 Message-ID: <20061023124219.GE8271@york.uk.xensource.com> References: <453020EE.4080603@goop.org> <200610231121.k9NBLCF09051@photon.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <200610231121.k9NBLCF09051@photon.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Doi.Tsunehisa@jp.fujitsu.com Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org At 20:21 +0900 on 23 Oct (1161634872), Doi.Tsunehisa@jp.fujitsu.com wrote: > > Are you worried about a race where the foreign domain is destroyed and > > another domain created, with the same struct domain pointer, and which > > owns the same frame, between the __acquire_grant_for_copy() and the > > get_page()? > > No, I'm worried that two domains use with same page frame. > > The released pages can be used by new domain, but old domain sturct > exists between domain_kill and domain_destroy. If the released frames are used by a new domain, get_page() will fail: the old domain still exists (we have a reference to it), so the new owner's domain pointer must be different from the one we pass to get_page. Cheers, Tim.