aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch
new file mode 100644
index 00000000..c2ee49e4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch
@@ -0,0 +1,29 @@
+From 20c073199e62b0b4bb9906612c0ba9db63de4f19 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 3 Oct 2017 14:27:15 +1000
+Subject: [PATCH 2454/4131] amdgpu/dm: don't use after free.
+
+This dereference acrtc after freeing it.
+
+Found by the kfree cocci script.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index d831d87..841f56d 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -3351,7 +3351,6 @@ static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
+ fail:
+ kfree(acrtc);
+ kfree(cursor_plane);
+- acrtc->crtc_id = -1;
+ return res;
+ }
+
+--
+2.7.4
+