diff options
| author | Thomas Hellstrom <thellstrom@vmware.com> | 2019-01-31 04:52:21 -0500 |
|---|---|---|
| committer | Thomas Hellstrom <thellstrom@vmware.com> | 2019-02-05 07:51:57 -0500 |
| commit | 51fdbeb4ca1a8415c98f87cb877956ae83e71627 (patch) | |
| tree | 95511b7c036fda53a2a54c069805e69f697469f5 | |
| parent | 728354c005c36eaf44b6e5552372b67e60d17f56 (diff) | |
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: 2724b2d54cda: ("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>
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index b351fb5214d3..5e257a600cea 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
| @@ -2554,8 +2554,8 @@ void vmw_kms_helper_validation_finish(struct vmw_private *dev_priv, | |||
| 2554 | user_fence_rep) | 2554 | user_fence_rep) |
| 2555 | { | 2555 | { |
| 2556 | struct vmw_fence_obj *fence = NULL; | 2556 | struct vmw_fence_obj *fence = NULL; |
| 2557 | uint32_t handle; | 2557 | uint32_t handle = 0; |
| 2558 | int ret; | 2558 | int ret = 0; |
| 2559 | 2559 | ||
| 2560 | if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) || | 2560 | if (file_priv || user_fence_rep || vmw_validation_has_bos(ctx) || |
| 2561 | out_fence) | 2561 | out_fence) |
