aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/sched.c
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2012-01-30 15:23:39 +0000
committerIan Jackson <ian.jackson@eu.citrix.com>2012-01-30 15:23:39 +0000
commitd3ec7b04d08dabb37bb09eb6876700f4f81f9392 (patch)
treed67da24328f8f6ec095ee3de3d5c07e0311d4a49 /extras/mini-os/sched.c
parentee8d9b684bb8199c4b2eb2da13980747fb086167 (diff)
downloadxen-d3ec7b04d08dabb37bb09eb6876700f4f81f9392.tar.gz
xen-d3ec7b04d08dabb37bb09eb6876700f4f81f9392.tar.bz2
xen-d3ec7b04d08dabb37bb09eb6876700f4f81f9392.zip
libxl: treat "dying" domains as destroyed
Rename the DOMAIN_DESTROY event to DOMAIN_DEATH and have it trigger when the domain goes into the state indicated by the domaininfo flag "dying". This fixes a race which could leak a daemonised xl process, which would have ignored the domain becoming "dying" and would then wait forever to be told the domain was destroyed. After the domain becomes "dying" we can't generate an event when it is actually destroyed because xenstored will eat the relevant VIRT_DOM_EXC virq and not generate an @releaseDomain, since xenstored discards its own record of the domain's existence as soon as it sees the domain "dying" and will not trigger @releaseDomain watches for domains it knows nothing about. Arguably this is a bug in xenstored, and the whole @releaseDomain machinery is rather poor, but let us not fix that now. Anyway, xl does not really want to know when the domain is ultimately destroyed. It is enough for xl to know that it is on the way out, in the "dying" state (which leads later to destruction by Xen). Also fix a bug where domain_death_xswatch_callback might read one domain beyond the valid data in its domaininfos array, by correctly ordering the checks for empty domain list, end of domain list, and our domain being missing. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/sched.c')
0 files changed, 0 insertions, 0 deletions