From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [Patch] Call sched_destroy_domain before cpupool_rm_domain. Date: Mon, 04 Nov 2013 07:30:10 +0100 Message-ID: <52773EF2.8000308@ts.fujitsu.com> References: <1383534234-3933-1-git-send-email-nate.studer@dornerworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383534234-3933-1-git-send-email-nate.studer@dornerworks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Nathan Studer Cc: George Dunlap , Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 04.11.2013 04:03, Nathan Studer wrote: > From: Nathan Studer > > 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 > --- > xen/common/domain.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen/common/domain.c b/xen/common/domain.c > index 5999779..78ce968 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); > -- Juergen Gross Principal Developer Operating Systems PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 62060 2932 Fujitsu e-mail: juergen.gross@ts.fujitsu.com Mies-van-der-Rohe-Str. 8 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html