Commit 0075a474 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Greg Kroah-Hartman

drm/vmwgfx: Fix an uninitialized fence handle value

commit 51fdbeb4 upstream.

if vmw_execbuf_fence_commands() fails, The handle value will be
uninitialized and a bogus fence handle might be copied to user-space.

Cc: <>
Fixes: 2724b2d5: ("drm/vmwgfx: Use new validation interface for the modesetting code v2")
Reported-by: default avatarDan Carpenter <>
Signed-off-by: default avatarThomas Hellstrom <>
Reviewed-by: Brian Paul <> #v1
Reviewed-by: Sinclair Yeh <> #v1
Reviewed-by: default avatarDeepak Rawat <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 64d569f5
......@@ -2592,8 +2592,8 @@ void vmw_kms_helper_validation_finish(struct vmw_private *dev_priv,
struct vmw_fence_obj *fence = NULL;
uint32_t handle;
int ret;
uint32_t handle = 0;
int ret = 0;
if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) ||
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment