aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch
new file mode 100644
index 00000000..9f123f5b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2896-drm-amd-display-Fix-access-of-wrong-array-element-TF.patch
@@ -0,0 +1,40 @@
+From 700a5be29467c9841b1334c4f7716095dda2dc32 Mon Sep 17 00:00:00 2001
+From: Harry Wentland <harry.wentland@amd.com>
+Date: Fri, 10 Nov 2017 12:12:40 -0500
+Subject: [PATCH 2896/4131] drm/amd/display: Fix access of wrong array element
+ TF format conversion
+
+Found by smatch:
+drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:357
+convert_to_custom_float() error: buffer overflow 'arr_points' 2 <= 2
+drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:358
+convert_to_custom_float() warn: buffer overflow 'arr_points' 2 <= 2
+
+Regression:
+drm/amd/display: Remove extra arr_points element
+
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+index 981bcd2..21fc27a 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+@@ -354,8 +354,8 @@ static bool convert_to_custom_float(struct pwl_result_data *rgb_resulted,
+ return false;
+ }
+
+- if (!convert_to_custom_float_format(arr_points[2].slope, &fmt,
+- &arr_points[2].custom_float_slope)) {
++ if (!convert_to_custom_float_format(arr_points[1].slope, &fmt,
++ &arr_points[1].custom_float_slope)) {
+ BREAK_TO_DEBUGGER();
+ return false;
+ }
+--
+2.7.4
+