Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-15 10:23:48 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-15 10:24:14 +0100
commitcc2c46acdc4b0b72f992a57c616fc705a19d4ab7 (patch)
tree57dde5e50f07cfff2dca08e8e1d4f93d9e09b491
parent20064cc95c906602d11bfd5e078b7bb8c0849d92 (diff)
drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
-rw-r--r--patches.kernel.org/4.20.9-043-drm-vmwgfx-Return-error-code-from-vmw_execbuf_.patch44
-rw-r--r--series.conf1
2 files changed, 45 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.9-043-drm-vmwgfx-Return-error-code-from-vmw_execbuf_.patch b/patches.kernel.org/4.20.9-043-drm-vmwgfx-Return-error-code-from-vmw_execbuf_.patch
new file mode 100644
index 0000000000..2dfc405c65
--- /dev/null
+++ b/patches.kernel.org/4.20.9-043-drm-vmwgfx-Return-error-code-from-vmw_execbuf_.patch
@@ -0,0 +1,44 @@
+From: Thomas Hellstrom <thellstrom@vmware.com>
+Date: Thu, 31 Jan 2019 10:55:37 +0100
+Subject: [PATCH] drm/vmwgfx: Return error code from
+ vmw_execbuf_copy_fence_user
+References: bnc#1012628
+Patch-mainline: 4.20.9
+Git-commit: 728354c005c36eaf44b6e5552372b67e60d17f56
+
+commit 728354c005c36eaf44b6e5552372b67e60d17f56 upstream.
+
+The function was unconditionally returning 0, and a caller would have to
+rely on the returned fence pointer being NULL to detect errors. However,
+the function vmw_execbuf_copy_fence_user() would expect a non-zero error
+code in that case and would BUG otherwise.
+
+So make sure we return a proper non-zero error code if the fence pointer
+returned is NULL.
+
+Cc: <stable@vger.kernel.org>
+Fixes: ae2a104058e2: ("vmwgfx: Implement fence objects")
+Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+Reviewed-by: Deepak Rawat <drawat@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+index f2d13a72c05d..88b8178d4687 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+@@ -3570,7 +3570,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv,
+ *p_fence = NULL;
+ }
+
+- return 0;
++ return ret;
+ }
+
+ /**
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 95dc6696f8..0535972a82 100644
--- a/series.conf
+++ b/series.conf
@@ -1125,6 +1125,7 @@
patches.kernel.org/4.20.9-040-drm-i915-always-return-something-on-DDI-clock-.patch
patches.kernel.org/4.20.9-041-drm-vmwgfx-Fix-setting-of-dma-masks.patch
patches.kernel.org/4.20.9-042-drm-vmwgfx-Fix-an-uninitialized-fence-handle-v.patch
+ patches.kernel.org/4.20.9-043-drm-vmwgfx-Return-error-code-from-vmw_execbuf_.patch
########################################################
# Build fixes that apply to the vanilla kernel too.