summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-15 21:55:25 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-15 21:55:25 -0400
commit7d6e97dfcfe26e1bb052187773e9bdb93ad1cf6a (patch)
treea653eb7b7764f815906247e2f3f5b3f754767f66
parente03d67047ec17ad495a66d35c493b17b19874bcd (diff)
downloadlongterm-queue-4.18-7d6e97dfcfe26e1bb052187773e9bdb93ad1cf6a.tar.gz
drm: vmwgfx ctxt refreshes
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch12
-rw-r--r--queue/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch10
2 files changed, 11 insertions, 11 deletions
diff --git a/queue/drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch b/queue/drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch
index 09058de..c66715a 100644
--- a/queue/drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch
+++ b/queue/drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch
@@ -1,4 +1,4 @@
-From bcd6aa7b6cbfd6f985f606c6f76046d782905820 Mon Sep 17 00:00:00 2001
+From 2e8c02f6976ee4f1fc1cf982775416e65e0d94c8 Mon Sep 17 00:00:00 2001
From: Murray McAllister <murray.mcallister@gmail.com>
Date: Sat, 11 May 2019 18:01:37 +1200
Subject: [PATCH] drm/vmwgfx: NULL pointer dereference from
@@ -18,11 +18,11 @@ Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
-index 315f9efce765..b4c7553d2814 100644
+index 8f62f90c8a7a..a589238db160 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
-@@ -2427,6 +2427,10 @@ static int vmw_cmd_dx_view_define(struct vmw_private *dev_priv,
- return -EINVAL;
+@@ -2406,6 +2406,10 @@ vmw_cmd_dx_set_single_constant_buffer(struct vmw_private *dev_priv,
+ }
cmd = container_of(header, typeof(*cmd), header);
+ if (unlikely(cmd->sid == SVGA3D_INVALID_ID)) {
@@ -30,8 +30,8 @@ index 315f9efce765..b4c7553d2814 100644
+ return -EINVAL;
+ }
ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
- VMW_RES_DIRTY_NONE, user_surface_converter,
- &cmd->sid, &srf);
+ user_surface_converter,
+ &cmd->body.sid, &res_node);
--
2.7.4
diff --git a/queue/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch b/queue/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch
index 2e5b7cc..adcb9f0 100644
--- a/queue/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch
+++ b/queue/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch
@@ -1,4 +1,4 @@
-From 5ed7f4b5eca11c3c69e7c8b53e4321812bc1ee1e Mon Sep 17 00:00:00 2001
+From 895dde5fe0ccb577ac75b7bb680a7bd78e79b324 Mon Sep 17 00:00:00 2001
From: Murray McAllister <murray.mcallister@gmail.com>
Date: Mon, 20 May 2019 21:57:34 +1200
Subject: [PATCH] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader()
@@ -19,18 +19,18 @@ Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
-index b4c7553d2814..33533d126277 100644
+index e1bc966c9244..8f62f90c8a7a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
-@@ -2206,7 +2206,8 @@ static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv,
+@@ -2495,7 +2495,8 @@ static int vmw_cmd_dx_set_shader(struct vmw_private *dev_priv,
cmd = container_of(header, typeof(*cmd), header);
- if (cmd->body.type >= SVGA3D_SHADERTYPE_DX10_MAX) {
+ if (cmd->body.type >= SVGA3D_SHADERTYPE_DX10_MAX ||
+ cmd->body.type < SVGA3D_SHADERTYPE_MIN) {
- VMW_DEBUG_USER("Illegal shader type %u.\n",
- (unsigned int) cmd->body.type);
+ DRM_ERROR("Illegal shader type %u.\n",
+ (unsigned) cmd->body.type);
return -EINVAL;
--
2.7.4