ia64/xen-unstable

changeset 5889:a9a956748997

Scrub initial xenstore page, free xendev structure.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Jul 26 17:24:22 2005 +0000 (2005-07-26)
parents b52196300306
children 26e4e952c385
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c 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_comms.c	Tue Jul 26 17:22:38 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Tue Jul 26 17:24:22 2005 +0000
     1.3 @@ -202,6 +202,9 @@ int xb_init_comms(void **in, void **out)
     1.4  		return err;
     1.5  	}
     1.6  
     1.7 +	/* FIXME zero out page -- domain builder should probably do this*/
     1.8 +	memset((void *)xen_start_info.store_page, 0, PAGE_SIZE);
     1.9 +
    1.10  	*out = (void *)xen_start_info.store_page;
    1.11  	*in = (void *)xen_start_info.store_page + PAGE_SIZE/2;
    1.12  	return 0;
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Tue Jul 26 17:22:38 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Tue Jul 26 17:24:22 2005 +0000
     2.3 @@ -150,6 +150,16 @@ struct xenbus_device *xenbus_device_find
     2.4  	return info.dev;
     2.5  }
     2.6  
     2.7 +
     2.8 +static void xenbus_release_device(struct device *dev)
     2.9 +{
    2.10 +	if (dev) {
    2.11 +		struct xenbus_device *xendev = to_xenbus_device(dev);
    2.12 +
    2.13 +		kfree(xendev->subtype);
    2.14 +		kfree(xendev);
    2.15 +	}
    2.16 +}
    2.17  /* devices/<typename>/<name> */
    2.18  static int xenbus_probe_device(const char *dirpath, const char *devicetype,
    2.19  			       const char *name)
    2.20 @@ -176,6 +186,7 @@ static int xenbus_probe_device(const cha
    2.21  	/* FIXME: look for "subtype" field. */
    2.22  	snprintf(xendev->dev.bus_id, BUS_ID_SIZE, "%s-%s", devicetype, name);
    2.23  	xendev->dev.bus = &xenbus_type;
    2.24 +	xendev->dev.release = xenbus_release_device;
    2.25  
    2.26  	/* Register with generic device framework. */
    2.27  	err = device_register(&xendev->dev);