]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 09:59:28 +0000 (11:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2024 09:59:28 +0000 (11:59 +0200)
added patches:
drm-amd-display-check-for-null-pointer.patch

queue-5.4/drm-amd-display-check-for-null-pointer.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/drm-amd-display-check-for-null-pointer.patch b/queue-5.4/drm-amd-display-check-for-null-pointer.patch
new file mode 100644 (file)
index 0000000..7c3dafb
--- /dev/null
@@ -0,0 +1,38 @@
+From 4ab68e168ae1695f7c04fae98930740aaf7c50fa Mon Sep 17 00:00:00 2001
+From: Sung Joon Kim <sungjoon.kim@amd.com>
+Date: Mon, 8 Jul 2024 19:29:49 -0400
+Subject: drm/amd/display: Check for NULL pointer
+
+From: Sung Joon Kim <sungjoon.kim@amd.com>
+
+commit 4ab68e168ae1695f7c04fae98930740aaf7c50fa upstream.
+
+[why & how]
+Need to make sure plane_state is initialized
+before accessing its members.
+
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Xi (Alex) Liu <xi.liu@amd.com>
+Signed-off-by: Sung Joon Kim <sungjoon.kim@amd.com>
+Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 295d91cbc700651782a60572f83c24861607b648)
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_surface.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_surface.c
+@@ -165,7 +165,8 @@ const struct dc_plane_status *dc_plane_g
+               if (pipe_ctx->plane_state != plane_state)
+                       continue;
+-              pipe_ctx->plane_state->status.is_flip_pending = false;
++              if (pipe_ctx->plane_state)
++                      pipe_ctx->plane_state->status.is_flip_pending = false;
+               break;
+       }
index 9e912d4a09d40c13a6b5e0decc1e7ec4b9e71817..b69b846546750918743b4181b68ec9329db18f9b 100644 (file)
@@ -96,3 +96,4 @@ media-venus-fix-use-after-free-in-vdec_close.patch
 hfs-fix-to-initialize-fields-of-hfs_inode_info-after-hfs_alloc_inode.patch
 drm-gma500-fix-null-pointer-dereference-in-cdv_intel_lvds_get_modes.patch
 drm-gma500-fix-null-pointer-dereference-in-psb_intel_lvds_get_modes.patch
+drm-amd-display-check-for-null-pointer.patch