diff options
author | Jan Beulich <JBeulich@suse.com> | 2012-03-05 12:11:31 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-03-13 14:15:29 -0400 |
commit | bd0d5aa417d40d6b996fb7b5c926bcecd56c8984 (patch) | |
tree | 7e05120b899c9bcabe1422d0c582c49d97cd1037 /drivers/xen | |
parent | 73c154c60be106b47f15d1111fc2d75cc7a436f2 (diff) |
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@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 3864967202b5..b793723e724d 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_dev) | |||
257 | DPRINTK("%s", dev->nodename); | 257 | DPRINTK("%s", dev->nodename); |
258 | 258 | ||
259 | free_otherend_watch(dev); | 259 | free_otherend_watch(dev); |
260 | free_otherend_details(dev); | ||
261 | 260 | ||
262 | if (drv->remove) | 261 | if (drv->remove) |
263 | drv->remove(dev); | 262 | drv->remove(dev); |
264 | 263 | ||
264 | free_otherend_details(dev); | ||
265 | |||
265 | xenbus_switch_state(dev, XenbusStateClosed); | 266 | xenbus_switch_state(dev, XenbusStateClosed); |
266 | return 0; | 267 | return 0; |
267 | } | 268 | } |