This is a note to let you know that I've just added the patch titled virtio-blk: Fix memory leak among suspend/resume procedure to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: virtio-blk-fix-memory-leak-among-suspend-resume-proc.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 43915ee908443cd3b1fd6e18afdb683607cbb27e Author: Xie Yongji <xieyongji@xxxxxxxxxxxxx> Date: Mon May 17 16:43:32 2021 +0800 virtio-blk: Fix memory leak among suspend/resume procedure [ Upstream commit b71ba22e7c6c6b279c66f53ee7818709774efa1f ] The vblk->vqs should be freed before we call init_vqs() in virtblk_restore(). Signed-off-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210517084332.280-1-xieyongji@xxxxxxxxxxxxx Acked-by: Jason Wang <jasowang@xxxxxxxxxx> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 2eeb2bcb488d..816eb2db7308 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -1057,6 +1057,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; }