linux-brain/drivers/gpu/drm/amd/display/dc/dcn10
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
..
Makefile drm/amd/display: move clk_mgr files to right place 2019-05-31 10:39:31 -05:00
dcn10_cm_common.c drm/amd/display: Allow inverted gamma 2019-10-30 11:56:15 -04:00
dcn10_cm_common.h drm/amd/display: Implement CM dealpha and bias interfaces 2019-05-31 10:39:29 -05:00
dcn10_dpp.c drm/amd/display: Enable HW rotation 2019-08-23 11:43:09 -05:00
dcn10_dpp.h drm/amd/display: add Cursor Degamma logic for DCN2 2019-08-23 11:42:58 -05:00
dcn10_dpp_cm.c drm/amd/display: Add DCN2 DPP 2019-06-21 18:59:34 -05:00
dcn10_dpp_dscl.c drm/amd/display: fix use_max_lb flag for 420 pixel formats 2021-07-19 08:53:08 +02:00
dcn10_dwb.c drm/amd/display: Add DCN2 DWB 2019-06-21 18:59:35 -05:00
dcn10_dwb.h drm/amd/display: Add DCN2 DWB 2019-06-21 18:59:35 -05:00
dcn10_hubbub.c drm/amd/display: fix dcc swath size calculations on dcn1 2020-03-25 08:25:49 +01:00
dcn10_hubbub.h drm/amd/display: Add Renoir hubbub registers list 2019-08-29 15:52:33 -05:00
dcn10_hubp.c drm/amd/display: HUBP/HUBBUB register programming fixes 2019-08-15 10:55:29 -05:00
dcn10_hubp.h drm/amd/display: HUBP/HUBBUB register programming fixes 2019-08-15 10:55:29 -05:00
dcn10_hw_sequencer.c drm/display: fix possible null-pointer dereference in dcn10_set_clock() 2021-09-22 12:26:32 +02:00
dcn10_hw_sequencer.h drm/amd/display: Add Underflow Asserts to dc 2019-06-22 09:34:14 -05:00
dcn10_hw_sequencer_debug.c drm/amd/display: refactor dump_clk_registers 2019-07-18 14:18:09 -05:00
dcn10_ipp.c Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
dcn10_ipp.h drm/amd/display: Add DCN2 IPP 2019-06-21 18:59:35 -05:00
dcn10_link_encoder.c drm/amd/display: set av_mute in hw_init for HDMI 2019-08-23 11:43:22 -05:00
dcn10_link_encoder.h drm/amd/display: set av_mute in hw_init for HDMI 2019-08-23 11:43:22 -05:00
dcn10_mpc.c drm/amd/display: enabling seamless boot sequence for dcn2 2019-08-15 10:54:27 -05:00
dcn10_mpc.h drm/amd/display: enabling seamless boot sequence for dcn2 2019-08-15 10:54:27 -05:00
dcn10_opp.c Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
dcn10_opp.h drm/amd/display: Move opp reg access from hwss to opp module. 2018-02-19 14:17:34 -05:00
dcn10_optc.c drm/amd/display: Expose OTG_V_TOTAL_MID for HW Diags 2019-08-23 11:43:42 -05:00
dcn10_optc.h drm/amd/display: Expose OTG_V_TOTAL_MID for HW Diags 2019-08-23 11:43:42 -05:00
dcn10_resource.c drm/amd/display: Reject overlay plane configurations in multi-display scenarios 2020-09-09 19:12:22 +02:00
dcn10_resource.h drm/amd/display: Use DCN functions instead of DCE 2019-05-24 12:21:00 -05:00
dcn10_stream_encoder.c drm/amd/display: Increase timeout for DP Disable 2020-11-05 11:43:33 +01:00
dcn10_stream_encoder.h drm/amd/display: Switch to immediate mode for updating infopackets 2020-09-03 11:26:58 +02:00