]> xenbits.xensource.com Git - xen.git/commit
xenconsoled: clean-up after all dead domains
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 31 Aug 2012 09:42:04 +0000 (10:42 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Fri, 31 Aug 2012 09:42:04 +0000 (10:42 +0100)
commit2b5fb80ff7f475ab9cd0fed0ffbe15a8acce4494
tree8e477b252e47d1032ae240e91be75ab8c0d53fb8
parent36d835637a4687a362405ee94f2867a05ed63ee6
xenconsoled: clean-up after all dead domains

xenconsoled expected domains that are being shutdown to end up in the
the DYING state and would only clean-up such domains.  HVM domains
either didn't enter the DYING state or weren't in long enough for
xenconsoled to notice.

For every shutdown HVM domain, xenconsoled would leak memory, grow its
list of domains and (if guest console logging was enabled) leak the
log file descriptor.  If the file descriptors were leaked and enough
HVM domains were shutdown, no more console connections would work as
the evtchn device could not be opened.  Guests would then block
waiting to send console output.

Fix this by tagging domains that exist in enum_domains().  Afterwards,
all untagged domains are assumed to be dead and are shutdown and
cleaned up.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/console/daemon/io.c