mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
d3ef5b488a
commit
be4c0619d5
1 file changed
+3
-3
@@ -1049,6 +1049,8 @@ static int __init xenbus_probe_init(void)
|
||||
if (xsd_port_intf)
|
||||
xsd_port_intf->read_proc = xsd_port_read;
|
||||
}
|
||||
else
|
||||
xenstored_ready = 1;
|
||||
|
||||
/* Initialize the interface to xenstore. */
|
||||
err = xs_init();
|
||||
@@ -1058,10 +1060,8 @@ static int __init xenbus_probe_init(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!dom0) {
|
||||
xenstored_ready = 1;
|
||||
if (!dom0)
|
||||
xenbus_probe(NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||