From: Nathan Studer Date: Wed, 6 Nov 2013 09:21:09 +0000 (+0100) Subject: call sched_destroy_domain before cpupool_rm_domain X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6054 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=117f67350fd18b11ab09d628b4edea3364b09441;p=xen.git 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 Reviewed-by: Juergen Gross Reviewed-by: Andrew Cooper Reviewed-by: George Dunlap Acked-by: Keir Fraser --- diff --git a/xen/common/domain.c b/xen/common/domain.c index ce20323fe4..8c9b813da3 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -727,10 +727,10 @@ static void complete_domain_destroy(struct rcu_head *head) 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);