Chris Lalancette
2008-May-21 13:12 UTC
[Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe]
(sent to the kvm mailing list erroneously first) -------------- next part -------------- An embedded message was scrubbed... From: Chris Lalancette <clalance at redhat.com> Subject: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe Date: Wed, 21 May 2008 14:45:31 +0200 Size: 4163 Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080521/d83a0253/attachment.eml
Rusty Russell
2008-May-22 11:33 UTC
[Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe]
On Wednesday 21 May 2008 23:12:39 Chris Lalancette wrote:> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 4962e62..c678ac5 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -294,6 +294,7 @@ static void virtblk_remove(struct virtio_device *vdev) > ????????vdev->config->reset(vdev); > ? > ????????blk_cleanup_queue(vblk->disk->queue); > +???????del_gendisk(vblk->disk); > ????????put_disk(vblk->disk); > ????????unregister_blkdev(major, "virtblk"); > ????????mempool_destroy(vblk->pool);Thanks Chris, it seems reasonable and I'm sure it works (kinda hard to test here, it's my root block dev). Other drivers seem to do blk_cleanup_queue() *after* del_gendisk: does it matter? Jens CC'd: he's gentle with my dumb questions... Rusty.
Possibly Parallel Threads
- [Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe]
- [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
- [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
- [PATCH 0/3] Fix hot-unplug race in virtio-blk
- [PATCH 0/3] Fix hot-unplug race in virtio-blk