]> xenbits.xensource.com Git - xen.git/commit
move domain to cpupool0 before destroying it
authorJuergen Gross <juergen.gross@ts.fujitsu.com>
Tue, 20 May 2014 13:55:42 +0000 (15:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 May 2014 13:55:42 +0000 (15:55 +0200)
commitbac6334b51d9bcfe57ecf4a4cb5288348fcf044a
tree2bad84c41e300235594ddc26379e67fbe9f21baf
parent04734664eb20c3bf239e473af182bb7ab901d779
move domain to cpupool0 before destroying it

Currently when a domain is destroyed it is removed from the domain_list
before all of it's resources, including the cpupool membership, are freed.
This can lead to a situation where the domain is still member of a cpupool
without for_each_domain_in_cpupool() (or even for_each_domain()) being
able to find it any more. This in turn can result in rejection of removing
the last cpu from a cpupool, because there seems to be still a domain in
the cpupool, even if it can't be found by scanning through all domains.

This situation can be avoided by moving the domain to be destroyed to
cpupool0 first and then remove it from this cpupool BEFORE deleting it from
the domain_list. As cpupool0 is always active and a domain without any cpupool
membership is implicitly regarded as belonging to cpupool0, this poses no
problem.

Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/domain.c