[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240709075053.811-1-lixianming.19951001@bytedance.com>
Date: Tue, 9 Jul 2024 15:50:53 +0800
From: "lixianming.19951001" <lixianming.19951001@...edance.com>
To: mst@...hat.com,
jasowang@...hat.com,
pbonzini@...hat.com
Cc: virtualization@...ts.linux.dev,
linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
lixianming <lixianming.19951001@...edance.com>
Subject: [PATCH] virtio_blk: stop all virtqueues when 'virtblk_probe' fails
From: lixianming <lixianming.19951001@...edance.com>
We have already enabled the queue in 'init_vq',
so we should stop all the virtqueues, just as
we do in 'virtblk_remove', when 'virtblk_probe'
fails
Signed-off-by: lixianming <lixianming.19951001@...edance.com>
---
drivers/block/virtio_blk.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 2351f411fa46..fb702be291c2 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -1559,6 +1559,8 @@ static int virtblk_probe(struct virtio_device *vdev)
out_free_tags:
blk_mq_free_tag_set(&vblk->tag_set);
out_free_vq:
+ virtio_reset_device(vdev);
+ vblk->vdev = NULL;
vdev->config->del_vqs(vdev);
kfree(vblk->vqs);
out_free_vblk:
--
2.20.1
Powered by blists - more mailing lists