提交 4492e247 编写于 作者: X Xie Yongji 提交者: Yang Yingliang

virtio-blk: Fix memory leak among suspend/resume procedure

stable inclusion
from linux-4.19.198
commit 600942d2fd49b90e44857d20c774b20d16f3130f

--------------------------------

[ Upstream commit b71ba22e ]

The vblk->vqs should be freed before we call init_vqs()
in virtblk_restore().
Signed-off-by: NXie Yongji <xieyongji@bytedance.com>
Link: https://lore.kernel.org/r/20210517084332.280-1-xieyongji@bytedance.comAcked-by: NJason Wang <jasowang@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 21cdc256
...@@ -940,6 +940,8 @@ static int virtblk_freeze(struct virtio_device *vdev) ...@@ -940,6 +940,8 @@ static int virtblk_freeze(struct virtio_device *vdev)
blk_mq_quiesce_queue(vblk->disk->queue); blk_mq_quiesce_queue(vblk->disk->queue);
vdev->config->del_vqs(vdev); vdev->config->del_vqs(vdev);
kfree(vblk->vqs);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册