ia64/xen-unstable

changeset 9326:e92b363402f9

Fix a race that crash domU by calling xenbus_probe twice if it receive event
between xs_init and setting xenbus_running

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author vhanquez@kneesa.uk.xensource.com
date Sat Mar 18 13:56:34 2006 +0000 (2006-03-18)
parents 4d4a700bea7a
children 8cc027def1de
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Sat Mar 18 11:12:45 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Sat Mar 18 13:56:34 2006 +0000
     1.3 @@ -1049,6 +1049,8 @@ static int __init xenbus_probe_init(void
     1.4  		if (xsd_port_intf)
     1.5  			xsd_port_intf->read_proc = xsd_port_read;
     1.6  	}
     1.7 +	else
     1.8 +		xenstored_ready = 1;
     1.9  
    1.10  	/* Initialize the interface to xenstore. */
    1.11  	err = xs_init();
    1.12 @@ -1058,10 +1060,8 @@ static int __init xenbus_probe_init(void
    1.13  		return err;
    1.14  	}
    1.15  
    1.16 -	if (!dom0) {
    1.17 -		xenstored_ready = 1;
    1.18 +	if (!dom0)
    1.19  		xenbus_probe(NULL);
    1.20 -	}
    1.21  
    1.22  	return 0;
    1.23  }