Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac9d463a authored by Chris Lalancette's avatar Chris Lalancette Committed by Rusty Russell
Browse files

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: default avatarChris Lalancette <clalance@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (moved del_gendisk up)
parent e27810f1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);