[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Scrub initial xenstore page, free xendev structure.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID a9a9567489975493f0e90a4e8f96917756dab8a0
# Parent  b5219630030688d67a6454c21d9a3aa400009ef1
Scrub initial xenstore page, free xendev structure.
Signed-off-by: Rusty Russel <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r b52196300306 -r a9a956748997 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Tue Jul 26 
17:22:38 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Tue Jul 26 
17:24:22 2005
@@ -202,6 +202,9 @@
                return err;
        }
 
+       /* FIXME zero out page -- domain builder should probably do this*/
+       memset((void *)xen_start_info.store_page, 0, PAGE_SIZE);
+
        *out = (void *)xen_start_info.store_page;
        *in = (void *)xen_start_info.store_page + PAGE_SIZE/2;
        return 0;
diff -r b52196300306 -r a9a956748997 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Tue Jul 26 
17:22:38 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Tue Jul 26 
17:24:22 2005
@@ -150,6 +150,16 @@
        return info.dev;
 }
 
+
+static void xenbus_release_device(struct device *dev)
+{
+       if (dev) {
+               struct xenbus_device *xendev = to_xenbus_device(dev);
+
+               kfree(xendev->subtype);
+               kfree(xendev);
+       }
+}
 /* devices/<typename>/<name> */
 static int xenbus_probe_device(const char *dirpath, const char *devicetype,
                               const char *name)
@@ -176,6 +186,7 @@
        /* FIXME: look for "subtype" field. */
        snprintf(xendev->dev.bus_id, BUS_ID_SIZE, "%s-%s", devicetype, name);
        xendev->dev.bus = &xenbus_type;
+       xendev->dev.release = xenbus_release_device;
 
        /* Register with generic device framework. */
        err = device_register(&xendev->dev);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.