summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-04-30 22:01:16 (GMT)
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 16:31:35 (GMT)
commit89de1669ace055b56f1de1c9f5aca26dd7f17f25 (patch)
treec67f2fa68f79eb9e4c31ef6991b23a58602039d6
parent5b61cb90c2ad8c853b4dd53eec200bacd2f02172 (diff)
downloadlinux-89de1669ace055b56f1de1c9f5aca26dd7f17f25.tar.xz
blkfront: Fix backtrace in del_gendisk
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>
-rw-r--r--drivers/block/xen-blkfront.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 7fa2a1d..3258ae6 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1021,14 +1021,14 @@ static void blkfront_closing(struct blkfront_info *info)
/* Flush gnttab callback work. Must be done with no locks held. */
flush_scheduled_work();
- blk_cleanup_queue(info->rq);
- info->rq = NULL;
-
minor = info->gd->first_minor;
nr_minors = info->gd->minors;
del_gendisk(info->gd);
xlbd_release_minors(minor, nr_minors);
+ blk_cleanup_queue(info->rq);
+ info->rq = NULL;
+
out:
if (info->xbdev)
xenbus_frontend_closed(info->xbdev);