aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch
new file mode 100644
index 00000000..56658d4e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2202-drm-amd-amdgpu-fix-over-bound-accessing-in-amdgpu_cs.patch
@@ -0,0 +1,33 @@
+From d60f6d70fff06aa2ce95fa5a2410d7bb0e172eea Mon Sep 17 00:00:00 2001
+From: Roger He <Hongbo.He@amd.com>
+Date: Fri, 17 Nov 2017 12:45:18 +0800
+Subject: [PATCH 2202/4131] drm/amd/amdgpu: fix over-bound accessing in
+ amdgpu_cs_wait_any_fence
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: If59582604b211b25ff50446339ea8621a3be23b0
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Signed-off-by: Roger He <Hongbo.He@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+index e3bcb5a..eec3fe2 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+@@ -1552,7 +1552,7 @@ static int amdgpu_cs_wait_any_fence(struct amdgpu_device *adev,
+ wait->out.status = (r > 0);
+ wait->out.first_signaled = first;
+
+- if (array[first])
++ if (first < fence_count && array[first])
+ r = array[first]->error;
+ else
+ r = 0;
+--
+2.7.4
+