diff options
author | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2005-10-26 13:41:00 +0100 |
---|---|---|
committer | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2005-10-26 13:41:00 +0100 |
commit | 5c8eb3b72788f4aa3b26462d224376a0e468f9c6 (patch) | |
tree | f8c322d804485f765978c3c12f3d3f33f7f80e54 /tools/console | |
parent | ccbd11acd6843de79d50236ee96446cff59eb3b8 (diff) | |
download | xen-5c8eb3b72788f4aa3b26462d224376a0e468f9c6.tar.gz xen-5c8eb3b72788f4aa3b26462d224376a0e468f9c6.tar.bz2 xen-5c8eb3b72788f4aa3b26462d224376a0e468f9c6.zip |
Check whether dom is NULL when we handle a watch. This might occur if the
domain has recently been removed from our list, but with a watch still in
flight. This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/daemon/io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 0b55607d50..ef3f094d27 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -512,7 +512,9 @@ static void handle_xs(int fd) enum_domains(); else if (sscanf(vec[XS_WATCH_TOKEN], "dom%u", &domid) == 1) { dom = lookup_domain(domid); - if (dom->is_dead == false) + /* We may get watches firing for domains that have recently + been removed, so dom may be NULL here. */ + if (dom && dom->is_dead == false) domain_create_ring(dom); } |