]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.22/drm-vmwgfx-return-error-code-from-vmw_execbuf_copy_fence_user.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.19.22 / drm-vmwgfx-return-error-code-from-vmw_execbuf_copy_fence_user.patch
CommitLineData
2cab9253
GKH
1From 728354c005c36eaf44b6e5552372b67e60d17f56 Mon Sep 17 00:00:00 2001
2From: Thomas Hellstrom <thellstrom@vmware.com>
3Date: Thu, 31 Jan 2019 10:55:37 +0100
4Subject: drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
5
6From: Thomas Hellstrom <thellstrom@vmware.com>
7
8commit 728354c005c36eaf44b6e5552372b67e60d17f56 upstream.
9
10The function was unconditionally returning 0, and a caller would have to
11rely on the returned fence pointer being NULL to detect errors. However,
12the function vmw_execbuf_copy_fence_user() would expect a non-zero error
13code in that case and would BUG otherwise.
14
15So make sure we return a proper non-zero error code if the fence pointer
16returned is NULL.
17
18Cc: <stable@vger.kernel.org>
19Fixes: ae2a104058e2: ("vmwgfx: Implement fence objects")
20Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
21Reviewed-by: Deepak Rawat <drawat@vmware.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
29+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
30@@ -3843,7 +3843,7 @@ int vmw_execbuf_fence_commands(struct dr
31 *p_fence = NULL;
32 }
33
34- return 0;
35+ return ret;
36 }
37
38 /**