direct-io.hg
changeset 6755:0fad07d67e75
Prevent opening the xenbus device if the store isn't connected yet.
Running xenstore clients using the xenbus device before the store
connection has been set up causes a crash because the store page
won't have been allocated yet. This is only a problem in dom0 where
we setup the store page from the PRIVCMD_INITDOMAIN_STORE ioctl.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Running xenstore clients using the xenbus device before the store
connection has been set up causes a crash because the store page
won't have been allocated yet. This is only a problem in dom0 where
we setup the store page from the PRIVCMD_INITDOMAIN_STORE ioctl.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Tue Sep 13 10:05:49 2005 +0000 (2005-09-13) |
parents | f804b28871ba |
children | 69bf4490062f 4d018790ff8a |
files | linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Tue Sep 13 09:11:58 2005 +0000 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Tue Sep 13 10:05:49 2005 +0000 1.3 @@ -130,6 +130,9 @@ static int xenbus_dev_open(struct inode 1.4 { 1.5 struct xenbus_dev_data *u; 1.6 1.7 + if (xen_start_info->store_evtchn == 0) 1.8 + return -ENOENT; 1.9 + 1.10 /* Don't try seeking. */ 1.11 nonseekable_open(inode, filp); 1.12