From: Keir Fraser Subject: Re: shadow2 corrupting PV guest state Date: Tue, 24 Oct 2006 10:44:52 +0100 Message-ID: References: <200610240939.k9O9d2F24332@photon.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200610240939.k9O9d2F24332@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, Tim Deegan Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org On 24/10/06 10:39, "Doi.Tsunehisa@jp.fujitsu.com" wrote: >> True, but we don't look at nd unless the page is allocated... > > Between domain_relinquish_resources() in domain_kill() and > shadow_final_teadown() in domain_destroy(), nd might be looked > with gnttab_copy(), I think. Domain_destroy() is only called when the domain refcnt reaches zero. This can only happen when all its page refcnts have reached zero. When a page's refcnt reaches zero, get_page() no longer succeeds on it. So there is no race between gnttab_copy() and domain_destroy(). -- Keir