ia64/xen-unstable

changeset 7527:a39aee6d660f

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>
author emellor@leeni.uk.xensource.com
date Wed Oct 26 13:41:00 2005 +0100 (2005-10-26)
parents 9b91f6583b5e
children 895d66f6de44
files tools/console/daemon/io.c
line diff
     1.1 --- a/tools/console/daemon/io.c	Wed Oct 26 12:06:58 2005 +0100
     1.2 +++ b/tools/console/daemon/io.c	Wed Oct 26 13:41:00 2005 +0100
     1.3 @@ -512,7 +512,9 @@ static void handle_xs(int fd)
     1.4  		enum_domains();
     1.5  	else if (sscanf(vec[XS_WATCH_TOKEN], "dom%u", &domid) == 1) {
     1.6  		dom = lookup_domain(domid);
     1.7 -		if (dom->is_dead == false)
     1.8 +		/* We may get watches firing for domains that have recently
     1.9 +		   been removed, so dom may be NULL here. */
    1.10 +		if (dom && dom->is_dead == false)
    1.11  			domain_create_ring(dom);
    1.12  	}
    1.13