summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorChris Lalancette <clalance@redhat.com>2008-05-30 22:09:41 +0200
committerRusty Russell <rusty@rustcorp.com.au>2008-05-30 07:09:41 +0200
commitac9d463afb1ca2434335351f3b7d9e4c8f8470e9 (patch)
tree02dd8e340507ebd7be549cca1c1a33ab42a02a7c /drivers/block
parentlguest: use ioremap_cache, not ioremap (diff)
downloadlinux-ac9d463afb1ca2434335351f3b7d9e4c8f8470e9.tar.xz
linux-ac9d463afb1ca2434335351f3b7d9e4c8f8470e9.zip
Fix crash in virtio_blk during modprobe ; rmmod ; modprobe
Fix a modprobe virtio_blk ; rmmod virtio_blk ; modprobe virtio_blk crash; this was basically because we weren't doing "del_gendisk()" in the remove path. Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (moved del_gendisk up)
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 84e064ffee52..c4804f3465db 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -311,6 +311,7 @@ static void virtblk_remove(struct virtio_device *vdev)
/* Stop all the virtqueues. */
vdev->config->reset(vdev);
+ del_gendisk(vblk->disk);
blk_cleanup_queue(vblk->disk->queue);
put_disk(vblk->disk);
mempool_destroy(vblk->pool);