* [PATCH] virtio-blk: Fix memory leak among suspend/resume procedure
@ 2021-05-17 8:43 Xie Yongji
2021-05-25 6:20 ` Jason Wang
0 siblings, 1 reply; 2+ messages in thread
From: Xie Yongji @ 2021-05-17 8:43 UTC (permalink / raw)
To: mst, jasowang, stefanha; +Cc: virtualization, linux-kernel
The vblk->vqs should be freed before we call init_vqs()
in virtblk_restore().
Signed-off-by: Xie Yongji <xieyongji@bytedance.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 367a1e929d7c..d24a8cea9aab 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -948,6 +948,8 @@ static int virtblk_freeze(struct virtio_device *vdev)
blk_mq_quiesce_queue(vblk->disk->queue);
vdev->config->del_vqs(vdev);
+ kfree(vblk->vqs);
+
return 0;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio-blk: Fix memory leak among suspend/resume procedure
2021-05-17 8:43 [PATCH] virtio-blk: Fix memory leak among suspend/resume procedure Xie Yongji
@ 2021-05-25 6:20 ` Jason Wang
0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2021-05-25 6:20 UTC (permalink / raw)
To: Xie Yongji, mst, stefanha; +Cc: virtualization, linux-kernel
在 2021/5/17 下午4:43, Xie Yongji 写道:
> The vblk->vqs should be freed before we call init_vqs()
> in virtblk_restore().
>
> Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.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 367a1e929d7c..d24a8cea9aab 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -948,6 +948,8 @@ static int virtblk_freeze(struct virtio_device *vdev)
> blk_mq_quiesce_queue(vblk->disk->queue);
>
> vdev->config->del_vqs(vdev);
> + kfree(vblk->vqs);
> +
> return 0;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-25 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 8:43 [PATCH] virtio-blk: Fix memory leak among suspend/resume procedure Xie Yongji
2021-05-25 6:20 ` Jason Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).