提交 ce2baf1b 编写于 作者: G Gerd Hoffmann 提交者: Zheng Zengkai

drm/qxl: release shadow on shutdown

stable inclusion
from stable-5.10.36
commit 6f64be8f5211221af6a5f8b8b315a485911c0ab6
bugzilla: 51867
CVE: NA

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

[ Upstream commit 4ca77c51 ]

In case we have a shadow surface on shutdown release
it so it doesn't leak.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Acked-by: NThomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-6-kraxel@redhat.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1261fa18
...@@ -1224,6 +1224,10 @@ int qxl_modeset_init(struct qxl_device *qdev) ...@@ -1224,6 +1224,10 @@ int qxl_modeset_init(struct qxl_device *qdev)
void qxl_modeset_fini(struct qxl_device *qdev) void qxl_modeset_fini(struct qxl_device *qdev)
{ {
if (qdev->dumb_shadow_bo) {
drm_gem_object_put(&qdev->dumb_shadow_bo->tbo.base);
qdev->dumb_shadow_bo = NULL;
}
qxl_destroy_monitors_object(qdev); qxl_destroy_monitors_object(qdev);
drm_mode_config_cleanup(&qdev->ddev); drm_mode_config_cleanup(&qdev->ddev);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册