aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-04-30 18:01:16 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:31:35 -0400
commit89de1669ace055b56f1de1c9f5aca26dd7f17f25 (patch)
treec67f2fa68f79eb9e4c31ef6991b23a58602039d6
parent5b61cb90c2ad8c853b4dd53eec200bacd2f02172 (diff)
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 7fa2a1db51e6..3258ae67ac7a 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)
1021 /* Flush gnttab callback work. Must be done with no locks held. */ 1021 /* Flush gnttab callback work. Must be done with no locks held. */
1022 flush_scheduled_work(); 1022 flush_scheduled_work();
1023 1023
1024 blk_cleanup_queue(info->rq);
1025 info->rq = NULL;
1026
1027 minor = info->gd->first_minor; 1024 minor = info->gd->first_minor;
1028 nr_minors = info->gd->minors; 1025 nr_minors = info->gd->minors;
1029 del_gendisk(info->gd); 1026 del_gendisk(info->gd);
1030 xlbd_release_minors(minor, nr_minors); 1027 xlbd_release_minors(minor, nr_minors);
1031 1028
1029 blk_cleanup_queue(info->rq);
1030 info->rq = NULL;
1031
1032 out: 1032 out:
1033 if (info->xbdev) 1033 if (info->xbdev)
1034 xenbus_frontend_closed(info->xbdev); 1034 xenbus_frontend_closed(info->xbdev);