mirror_ubuntu-kernels/drivers/gpu/drm/amd
Tuo Li 554594567b drm/display: fix possible null-pointer dereference in dcn10_set_clock()
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>
2021-08-11 17:19:54 -04:00
..
acp
amdgpu gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port() 2021-08-11 17:19:54 -04:00
amdkfd drm/amdkfd: CWSR with software scheduler 2021-08-11 17:19:54 -04:00
display drm/display: fix possible null-pointer dereference in dcn10_set_clock() 2021-08-11 17:19:54 -04:00
include drm/amdkfd: CWSR with software scheduler 2021-08-11 17:19:54 -04:00
pm drm/amd/pm: graceful exit on restore fan mode failure (v2) 2021-08-11 17:18:26 -04:00