linux-brain/drivers/gpu/drm/amd/display
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
..
amdgpu_dm drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex 2021-09-22 12:26:28 +02:00
dc drm/display: fix possible null-pointer dereference in dcn10_set_clock() 2021-09-22 12:26:32 +02:00
include drm/amd/display: fix pow() crashing when given base 0 2020-08-26 10:40:53 +02:00
modules drm/amdgpu: fix build_coefficients() argument 2020-12-30 11:51:04 +01:00
Kconfig drm/amd/display: add Renoir to kconfig 2019-08-29 15:52:33 -05:00
Makefile drm/amd/display: move clk_mgr files to right place 2019-05-31 10:39:31 -05:00
TODO drm/amd/display: Convert remaining loggers off dc_logger 2018-07-13 14:48:42 -05:00