[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b244c1b3d8e0febf375946e2acf7a893528f4255.1279658433.git.jeremy.fitzhardinge@citrix.com>
Date: Tue, 20 Jul 2010 13:42:16 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Xen-devel <xen-devel@...ts.xensource.com>,
Daniel Stodden <daniel.stodden@...rix.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: [PATCH 08/16] blkfront: Fix backtrace in del_gendisk
From: Daniel Stodden <daniel.stodden@...rix.com>
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@...rix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
drivers/block/xen-blkfront.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 50b2952..62eba76 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);
--
1.7.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists