[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86/mm: Don't lose track of the log dirty bitmap



# HG changeset patch
# User Tim Deegan <tim@xxxxxxx>
# Date 1331108027 0
# Node ID a6bbda6dc322c4581d45fb98b005129a0acb9d62
# Parent  ffda50fa20ab376821e19edcdf9042df31fabffe
x86/mm: Don't lose track of the log dirty bitmap

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.

Signed-off-by: Tim Deegan <tim@xxxxxxx>
Acked-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
xen-unstable changeset:   24282:a06cda9fb25f
xen-unstable date:        Thu Dec 01 14:17:16 2011 +0000
---


diff -r ffda50fa20ab -r a6bbda6dc322 xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c  Wed Mar 07 08:13:00 2012 +0000
+++ b/xen/arch/x86/mm/paging.c  Wed Mar 07 08:13:47 2012 +0000
@@ -665,7 +665,6 @@
     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. */
@@ -686,6 +685,11 @@
     if ( (rc = p2m_init(d)) != 0 )
         return rc;
 
+    /* This must be initialized separately from the rest of the
+     * log-dirty init code as that can be called more than once and we
+     * don't want to leak any active log-dirty bitmaps */
+    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... */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.