Skip to content

Commit 51fdbeb

Browse files
committed
drm/vmwgfx: Fix an uninitialized fence handle value
if vmw_execbuf_fence_commands() fails, The handle value will be uninitialized and a bogus fence handle might be copied to user-space. Cc: <stable@vger.kernel.org> Fixes: 2724b2d: ("drm/vmwgfx: Use new validation interface for the modesetting code v2") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> #v1 Reviewed-by: Sinclair Yeh <syeh@vmware.com> #v1 Reviewed-by: Deepak Rawat <drawat@vmware.com>
1 parent 728354c commit 51fdbeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,8 +2554,8 @@ void vmw_kms_helper_validation_finish(struct vmw_private *dev_priv,
25542554
user_fence_rep)
25552555
{
25562556
struct vmw_fence_obj *fence = NULL;
2557-
uint32_t handle;
2558-
int ret;
2557+
uint32_t handle = 0;
2558+
int ret = 0;
25592559

25602560
if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) ||
25612561
out_fence)

0 commit comments

Comments
 (0)