lkml.org 
[lkml]   [2021]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] virtio-blk: Fix memory leak among suspend/resume procedure
From
Date

在 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;
> }
>

\
 
 \ /
  Last update: 2021-05-25 08:23    [W:0.065 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site