summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-03-14 11:48:52 +0000
committerWilly Tarreau <w@1wt.eu>2012-03-17 11:14:52 +0100
commitbee69f9f61274bb94f37cd7fe22411ea7429d84b (patch)
tree8296e320afddf557a4f43dd07e8bfd497337eef7
parent53148aeb4106b570c5ad4e6b2e9b3452f18b76ca (diff)
downloadlwn-bee69f9f61274bb94f37cd7fe22411ea7429d84b.tar.gz
lwn-bee69f9f61274bb94f37cd7fe22411ea7429d84b.zip
blkfront: Fix backtrace in del_gendisk
Commit 89de1669ace055b56f1de1c9f5aca26dd7f17f25 upstream. The call to del_gendisk follows an non-refcounted gd->queue pointer. We release the last ref in blk_cleanup_queue. Fixed by reordering releases accordingly. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--drivers/block/xen-blkfront.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index a2e8977abaad..605d92e3cc6b 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -942,11 +942,11 @@ static void blkfront_closing(struct xenbus_device *dev)
/* Flush gnttab callback work. Must be done with no locks held. */
flush_scheduled_work();
+ del_gendisk(info->gd);
+
blk_cleanup_queue(info->rq);
info->rq = NULL;
- del_gendisk(info->gd);
-
out:
xenbus_frontend_closed(dev);
}