xen/527a0a05-call-sched_destroy_domain-before-cpupool_rm_domain.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

# Commit 117f67350fd18b11ab09d628b4edea3364b09441
# Date 2013-11-06 10:21:09 +0100
# Author Nathan Studer <nate.studer@dornerworks.com>
# Committer Jan Beulich <jbeulich@suse.com>
call sched_destroy_domain before cpupool_rm_domain
The domain destruction code, removes a domain from its cpupool
before attempting to destroy its scheduler information. Since
the scheduler framework uses the domain's cpupool information
to decide on which scheduler ops to use, this results in the
the wrong scheduler's destroy domain function being called
when the cpupool scheduler and the initial scheduler are
different.
Correct this by destroying the domain's scheduling information
before removing it from the pool.
Signed-off-by: Nathan Studer <nate.studer@dornerworks.com>
Reviewed-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -720,10 +720,10 @@ static void complete_domain_destroy(stru
rangeset_domain_destroy(d);
- cpupool_rm_domain(d);
-
sched_destroy_domain(d);
+ cpupool_rm_domain(d);
+
/* Free page used by xen oprofile buffer. */
#ifdef CONFIG_XENOPROF
free_xenoprof_pages(d);