WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] 32on64 vCPU cleanup fix

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] 32on64 vCPU cleanup fix
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 26 Apr 2007 16:55:18 +0100
Delivery-date: Thu, 26 Apr 2007 08:52:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Since vcpu_destroy_pagetables() clears v->arch.guest_table for hvm vCPUs,
it must be avoided to free the page with MFN zero.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-04-18/xen/arch/x86/domain.c
===================================================================
--- 2007-04-18.orig/xen/arch/x86/domain.c       2007-04-26 13:52:22.000000000 
+0200
+++ 2007-04-18/xen/arch/x86/domain.c    2007-04-26 13:53:14.000000000 +0200
@@ -252,9 +252,12 @@ static int setup_compat_l4(struct vcpu *
 
 static void release_compat_l4(struct vcpu *v)
 {
-    free_domheap_page(pagetable_get_page(v->arch.guest_table));
-    v->arch.guest_table = pagetable_null();
-    v->arch.guest_table_user = pagetable_null();
+    if ( !pagetable_is_null(v->arch.guest_table) )
+    {
+        free_domheap_page(pagetable_get_page(v->arch.guest_table));
+        v->arch.guest_table = pagetable_null();
+        v->arch.guest_table_user = pagetable_null();
+    }
 }
 
 static inline int may_switch_mode(struct domain *d)




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>