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-changelog

[Xen-changelog] [xen-unstable] Fix Xen panic with oprofile

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix Xen panic with oprofile
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 06 Dec 2008 04:20:09 -0800
Delivery-date: Sat, 06 Dec 2008 04:20:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228218804 0
# Node ID fc5208167bb69f7d02247644fd76a82a2649e310
# Parent  f39673ce7d6e084d86b2d5c8c77eca63fa469c0a
Fix Xen panic with oprofile

The attached patch fixes a Xen panic when a domain is shutdown before
oprofile is stopped. Without this patch, free_xenoprof_pages() is
called before the domain is destroyed and that, in turn, prevents
oprofile from cleaning up pages shared with guests. Shutting down a
domain without terminating oprofile therefore causes a Xen panic at a
later point in time.

Signed-off-by: Niraj Tolia <niraj.tolia@xxxxxx>
---
 xen/arch/ia64/xen/domain.c |    3 ---
 xen/arch/x86/domain.c      |    3 ---
 xen/common/domain.c        |    3 +++
 3 files changed, 3 insertions(+), 6 deletions(-)

diff -r f39673ce7d6e -r fc5208167bb6 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon Dec 01 13:45:46 2008 +0000
+++ b/xen/arch/ia64/xen/domain.c        Tue Dec 02 11:53:24 2008 +0000
@@ -1686,9 +1686,6 @@ int domain_relinquish_resources(struct d
        if (is_hvm_domain(d) && d->arch.sal_data)
                xfree(d->arch.sal_data);
 
-       /* Free page used by xen oprofile buffer */
-       free_xenoprof_pages(d);
-
        return 0;
 }
 
diff -r f39673ce7d6e -r fc5208167bb6 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Mon Dec 01 13:45:46 2008 +0000
+++ b/xen/arch/x86/domain.c     Tue Dec 02 11:53:24 2008 +0000
@@ -1864,9 +1864,6 @@ int domain_relinquish_resources(struct d
         BUG();
     }
 
-    /* Free page used by xen oprofile buffer. */
-    free_xenoprof_pages(d);
-
     if ( is_hvm_domain(d) )
         hvm_domain_relinquish_resources(d);
 
diff -r f39673ce7d6e -r fc5208167bb6 xen/common/domain.c
--- a/xen/common/domain.c       Mon Dec 01 13:45:46 2008 +0000
+++ b/xen/common/domain.c       Tue Dec 02 11:53:24 2008 +0000
@@ -553,6 +553,9 @@ static void complete_domain_destroy(stru
 
     sched_destroy_domain(d);
 
+    /* Free page used by xen oprofile buffer. */
+    free_xenoprof_pages(d);
+
     for ( i = MAX_VIRT_CPUS-1; i >= 0; i-- )
         if ( (v = d->vcpu[i]) != NULL )
             free_vcpu_struct(v);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix Xen panic with oprofile, Xen patchbot-unstable <=