linux-brain/drivers/gpu/drm/amd/display/dc
Tuo Li 1e2842fb7e drm/display: fix possible null-pointer dereference in dcn10_set_clock()
[ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ]

The variable dc->clk_mgr is checked in:
  if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock)

This indicates dc->clk_mgr can be NULL.
However, it is dereferenced in:
    if (!dc->clk_mgr->funcs->get_clock)

To fix this null-pointer dereference, check dc->clk_mgr and the function
pointer dc->clk_mgr->funcs->get_clock earlier, and return if one of them
is NULL.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Tuo Li <islituo@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:26:32 +02:00
..
basics drm/amd: drop use of drmp.h in os_types.h 2019-06-10 22:59:45 +02:00
bios drm/amd/display: Fix HDMI deep color output for DCE 6-11. 2021-03-04 10:26:22 +01:00
calcs drm/amdgpu/display: handle multiple numbers of fclks in dcn_calcs.c (v2) 2020-02-24 08:37:03 +01:00
clk_mgr drm/amd/display: Init clock value by current vbios CLKs 2020-12-30 11:50:57 +01:00
core drm/amd/display: Release MST resources on switch from MST to SST 2021-07-19 08:53:10 +02:00
dce drm/amd/display: Fix HDMI deep color output for DCE 6-11. 2021-03-04 10:26:22 +01:00
dce80 drm/amd/display: memory leak 2019-10-02 12:58:33 -05:00
dce100 drm/amd/display: memory leak 2019-10-02 12:58:33 -05:00
dce110 drm/amd/display: memory leak 2019-10-02 12:58:33 -05:00
dce112 drm/amd/display: memory leak 2019-10-02 12:58:33 -05:00
dce120 drm/amd/display: memory leak 2019-10-02 12:58:33 -05:00
dcn10 drm/display: fix possible null-pointer dereference in dcn10_set_clock() 2021-09-22 12:26:32 +02:00
dcn20 drm/amd/display: Fix timer_per_pixel unit error 2021-09-22 12:26:28 +02:00
dcn21 drm/amd/display: Revert dram_clock_change_latency for DCN2.1 2021-03-30 14:35:22 +02:00
dml drm/amd/display: fix dml prefetch validation 2021-05-11 14:04:09 +02:00
dsc drm/amdgpu: enable -msse2 for GCC 7.1+ users 2019-10-30 11:56:20 -04:00
gpio drm/amd/display: Fix kernel panic by dal_gpio_open() error 2020-11-05 11:43:34 +01:00
inc drm/amd/display: fix image corruption with ODM 2:1 DSC 2 slice 2020-10-01 13:17:38 +02:00
irq drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1 2021-03-04 10:26:43 +01:00
virtual drm/amd/display: reset hdmi tmds rate and data scramble on pipe reset 2019-08-15 10:52:59 -05:00
Makefile drm/amd/display: build dcn21 blocks 2019-08-29 15:52:33 -05:00
dc.h drm/amd/display: add dcn21 core DC changes 2019-08-29 15:52:33 -05:00
dc_bios_types.h drm/amd/display: make firmware info only load once during dc_bios create 2019-08-15 10:53:36 -05:00
dc_ddc_types.h drm/amd/display: add i2c over aux failure handling 2019-03-19 15:36:49 -05:00
dc_dp_types.h drm/amd/display: Synchronous DisplayPort Link Training 2019-08-15 10:53:30 -05:00
dc_dsc.h drm/amd/display: update DSC MST DP virtual DPCD peer device enumeration policy 2019-06-22 09:34:13 -05:00
dc_helper.c drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dc_hw_types.h drm/amd/display: Expose OTG_V_TOTAL_MID for HW Diags 2019-08-23 11:43:42 -05:00
dc_link.h drm/amd/display: Synchronous DisplayPort Link Training 2019-08-15 10:53:30 -05:00
dc_stream.h drm/amd/display: Expose audio inst from DC to DM 2019-07-11 14:37:24 -05:00
dc_types.h drm/amd/display: add set and get clock for testing purposes 2019-07-18 14:27:25 -05:00
dm_event_log.h drm/amd/display: Add customizable tracing event 2018-11-30 12:02:49 -05:00
dm_helpers.h drm/amd/display: Add DSC support for Navi (v2) 2019-06-22 09:34:07 -05:00
dm_pp_smu.h drm/amd/display: Add pp_smu functions for Renoir 2019-08-29 15:52:33 -05:00
dm_services.h drm/amd/display: refactor dump_clk_registers 2019-07-18 14:18:09 -05:00
dm_services_types.h drm/amd/display: PPLIB Hookup 2019-03-05 15:09:32 -05:00
irq_types.h drm/amd/display: fix incorrrect valid irq check 2021-07-19 08:53:14 +02:00
os_types.h drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally 2020-11-05 11:43:34 +01:00