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

[Xen-devel] [PATCH] linux-2.6.18/xenbus: don't free other end details too early


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Tue, 06 Mar 2012 08:49:20 +0000
  • Delivery-date: Tue, 06 Mar 2012 08:49:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

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>

--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -332,11 +332,12 @@ int xenbus_dev_remove(struct device *_de
        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;
 }



Attachment: xen-xenbus-remove-details.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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