xen/domain: Call sched_destroy_domain() in the domain_create() error path
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Feb 2018 11:43:25 +0000 (11:43 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Mar 2018 16:00:37 +0000 (16:00 +0000)
commitc77ec3478ac0e117c814789bdd4caab60b4732c5
tree9d3a1ec4813ccb1a8e5d51b889181a5171cfb33a
parentc3715dd8fb766eb6f90d9cd81ef892f917845238
xen/domain: Call sched_destroy_domain() in the domain_create() error path

If domain_create() fails, complete_domain_destroy() doesn't get called,
meaning that sched_destroy_domain() is missed.  In practice, this can only
fail because of exceptional late_hwdom_init() issues at the moment.

Make sched_destroy_domain() idempotent, and call it in the fail path.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/domain.c
xen/common/schedule.c