From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 3 of 9] x86/mm: Don't lose track of the log dirty bitmap Date: Tue, 29 Nov 2011 15:21:40 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org, keir.xen@gmail.com, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org xen/arch/x86/mm/paging.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hap_log_dirty_init unconditionally sets the top of the log dirty bitmap to INVALID_MFN. If there had been a bitmap allocated, it is then leaked, and the host crashes on an ASSERT when the domain is cleaned up. Fixing it here. Signed-off-by: Tim Deegan Acked-by: Andres Lagar-Cavilla diff -r 1b241f984167 -r bea03a7fe212 xen/arch/x86/mm/paging.c --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -595,7 +595,6 @@ void paging_log_dirty_init(struct domain d->arch.paging.log_dirty.enable_log_dirty = enable_log_dirty; d->arch.paging.log_dirty.disable_log_dirty = disable_log_dirty; d->arch.paging.log_dirty.clean_dirty_bitmap = clean_dirty_bitmap; - d->arch.paging.log_dirty.top = _mfn(INVALID_MFN); } /* This function fress log dirty bitmap resources. */ @@ -617,6 +616,7 @@ int paging_domain_init(struct domain *d, mm_lock_init(&d->arch.paging.lock); + d->arch.paging.log_dirty.top = _mfn(INVALID_MFN); /* The order of the *_init calls below is important, as the later * ones may rewrite some common fields. Shadow pagetables are the * default... */