]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/amd/display: Guard against null crtc in CRC IRQ
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 3 Aug 2018 14:40:20 +0000 (10:40 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Aug 2018 22:29:44 +0000 (17:29 -0500)
commitdddc0557e3a02499ce336b1e2e67f5afaecccc80
tree04b7289bad3a6e91dabc2fc69bf05ea44c1089bc
parent433149130c31de3f63b17b4ce08b45dab208f7e8
drm/amd/display: Guard against null crtc in CRC IRQ

[Why]

A null pointer deference can occur if crtc is null in
amdgpu_dm_crtc_handle_crc_irq. This can happen if get_crtc_by_otg_inst
returns NULL during dm_crtc_high_irq, leading to a hang in some IGT
test cases.

[How]

Check that CRTC is non-null before accessing its fields.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c