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

[Xen-changelog] [xen-unstable] Fix c/s 19886: Must free pages after synchronously scrubbing them



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1246607691 -3600
# Node ID c23d71600634232c08da32086a17679634c13d4b
# Parent  d461c4d8af17c86dc7e4a1ff730f85634e73eb26
Fix c/s 19886: Must free pages after synchronously scrubbing them
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/page_alloc.c |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff -r d461c4d8af17 -r c23d71600634 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Thu Jul 02 21:45:30 2009 +0100
+++ b/xen/common/page_alloc.c   Fri Jul 03 08:54:51 2009 +0100
@@ -1206,23 +1206,16 @@ void free_domheap_pages(struct page_info
 
         spin_unlock_recursive(&d->page_alloc_lock);
 
-        if ( likely(!d->is_dying) )
-        {
-            free_heap_pages(pg, order);
-        }
-        else
-        {
-            /*
-             * Normally we expect a domain to clear pages before freeing them,
-             * if it cares about the secrecy of their contents. However, after
-             * a domain has died we assume responsibility for erasure.
-             */
+        /*
+         * Normally we expect a domain to clear pages before freeing them, if 
+         * it cares about the secrecy of their contents. However, after a 
+         * domain has died we assume responsibility for erasure.
+         */
+        if ( unlikely(d->is_dying) )
             for ( i = 0; i < (1 << order); i++ )
-            {
-                page_set_owner(&pg[i], NULL);
                 scrub_one_page(&pg[i]);
-            }
-        }
+
+        free_heap_pages(pg, order);
     }
     else
     {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.