aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2454-amdgpu-dm-don-t-use-after-free.patch
blob: c2ee49e44ee35dd3732a80c870307993cce903fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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