summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-10-03 07:27:15 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-10-06 20:05:22 +0300
commitae3a27d19b59e431aea9f9d5917c1aec710ae4c3 (patch)
tree97a95e5963360c8d91c08ec7fc0af7ea590cb27f
parentd029810caafa4e6b146274560154e3f0f0381fb5 (diff)
downloadlinux-ae3a27d19b59e431aea9f9d5917c1aec710ae4c3.tar.xz
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> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c1
1 files changed, 0 insertions, 1 deletions
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 61ccddd19718..4f8973182f8a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3174,7 +3174,6 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
fail:
kfree(acrtc);
kfree(cursor_plane);
- acrtc->crtc_id = -1;
return res;
}