Skip to content

Commit

Permalink
xenbus: don't free other end details too early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Beulich authored and Konrad Rzeszutek Wilk committed Mar 13, 2012
1 parent 73c154c commit bd0d5aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/xen/xenbus/xenbus_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_dev)
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;
}
Expand Down

0 comments on commit bd0d5aa

Please sign in to comment.