diff mbox series

[SRU,F,v2,6/7] drm/qxl: allocate dumb buffers in ram

Message ID 20240308201150.25987-7-bethany.jamison@canonical.com
State New
Headers show
Series CVE-2023-39198 | expand

Commit Message

Bethany Jamison March 8, 2024, 8:11 p.m. UTC
From: Gerd Hoffmann <kraxel@redhat.com>

dumb buffers are shadowed anyway, so there is no need to store them
in device memory.  Use QXL_GEM_DOMAIN_CPU (TTM_PL_SYSTEM) instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-11-kraxel@redhat.com
(cherry picked from commit f4a84e165e6d58606097dd07b5b78767a94b870c)
CVE-2023-39198
Signed-off-by: Bethany Jamison <bethany.jamison@canonical.com>
---
 drivers/gpu/drm/qxl/qxl_dumb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gpu/drm/qxl/qxl_dumb.c
index bddd6544f2c8..7a79da125547 100644
--- a/drivers/gpu/drm/qxl/qxl_dumb.c
+++ b/drivers/gpu/drm/qxl/qxl_dumb.c
@@ -61,7 +61,7 @@  int qxl_mode_dumb_create(struct drm_file *file_priv,
 	surf.data = 0;
 
 	r = qxl_gem_object_create_with_handle(qdev, file_priv,
-					      QXL_GEM_DOMAIN_SURFACE,
+					      QXL_GEM_DOMAIN_CPU,
 					      args->size, &surf, &qobj,
 					      &handle);
 	if (r)