提交 89de1669 编写于 作者: D Daniel Stodden 提交者: Jens Axboe

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: NDaniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
上级 5b61cb90
...@@ -1021,14 +1021,14 @@ static void blkfront_closing(struct blkfront_info *info) ...@@ -1021,14 +1021,14 @@ static void blkfront_closing(struct blkfront_info *info)
/* Flush gnttab callback work. Must be done with no locks held. */ /* Flush gnttab callback work. Must be done with no locks held. */
flush_scheduled_work(); flush_scheduled_work();
blk_cleanup_queue(info->rq);
info->rq = NULL;
minor = info->gd->first_minor; minor = info->gd->first_minor;
nr_minors = info->gd->minors; nr_minors = info->gd->minors;
del_gendisk(info->gd); del_gendisk(info->gd);
xlbd_release_minors(minor, nr_minors); xlbd_release_minors(minor, nr_minors);
blk_cleanup_queue(info->rq);
info->rq = NULL;
out: out:
if (info->xbdev) if (info->xbdev)
xenbus_frontend_closed(info->xbdev); xenbus_frontend_closed(info->xbdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册