ia64/xen-unstable
changeset 18849:fc5208167bb6
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@hp.com>
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@hp.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Dec 02 11:53:24 2008 +0000 (2008-12-02) |
parents | f39673ce7d6e |
children | 2797ad550925 |
files | xen/arch/ia64/xen/domain.c xen/arch/x86/domain.c xen/common/domain.c |
line diff
1.1 --- a/xen/arch/ia64/xen/domain.c Mon Dec 01 13:45:46 2008 +0000 1.2 +++ b/xen/arch/ia64/xen/domain.c Tue Dec 02 11:53:24 2008 +0000 1.3 @@ -1686,9 +1686,6 @@ int domain_relinquish_resources(struct d 1.4 if (is_hvm_domain(d) && d->arch.sal_data) 1.5 xfree(d->arch.sal_data); 1.6 1.7 - /* Free page used by xen oprofile buffer */ 1.8 - free_xenoprof_pages(d); 1.9 - 1.10 return 0; 1.11 } 1.12
2.1 --- a/xen/arch/x86/domain.c Mon Dec 01 13:45:46 2008 +0000 2.2 +++ b/xen/arch/x86/domain.c Tue Dec 02 11:53:24 2008 +0000 2.3 @@ -1864,9 +1864,6 @@ int domain_relinquish_resources(struct d 2.4 BUG(); 2.5 } 2.6 2.7 - /* Free page used by xen oprofile buffer. */ 2.8 - free_xenoprof_pages(d); 2.9 - 2.10 if ( is_hvm_domain(d) ) 2.11 hvm_domain_relinquish_resources(d); 2.12
3.1 --- a/xen/common/domain.c Mon Dec 01 13:45:46 2008 +0000 3.2 +++ b/xen/common/domain.c Tue Dec 02 11:53:24 2008 +0000 3.3 @@ -553,6 +553,9 @@ static void complete_domain_destroy(stru 3.4 3.5 sched_destroy_domain(d); 3.6 3.7 + /* Free page used by xen oprofile buffer. */ 3.8 + free_xenoprof_pages(d); 3.9 + 3.10 for ( i = MAX_VIRT_CPUS-1; i >= 0; i-- ) 3.11 if ( (v = d->vcpu[i]) != NULL ) 3.12 free_vcpu_struct(v);