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

[Xen-changelog] [linux-2.6.18-xen] xenbus: don't free other end details too early



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1331126863 -3600
# Node ID 504cb8e1146656ef83a7cccfe6c2bcbf24bb2e34
# Parent  151972c92963e10b7943bc6b6381a79caf566b5d
xenbus: don't free other end details too early

The individual drivers' remove functions could legitimately attempt to
access this information (for logging messages if nothing else). Note
that I did not in fact observe a problem anywhere, but I came across
this while looking into the reasons for what turned out to need the
fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 151972c92963 -r 504cb8e11466 drivers/xen/xenbus/xenbus_probe.c
--- a/drivers/xen/xenbus/xenbus_probe.c Mon Feb 27 17:51:49 2012 +0100
+++ b/drivers/xen/xenbus/xenbus_probe.c Wed Mar 07 14:27:43 2012 +0100
@@ -332,11 +332,12 @@
        DPRINTK("%s", dev->nodename);
 
        free_otherend_watch(dev);
-       free_otherend_details(dev);
 
        if (drv->remove)
                drv->remove(dev);
 
+       free_otherend_details(dev);
+
        xenbus_switch_state(dev, XenbusStateClosed);
        return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.