Commit c47066ed authored by Ivan Stepchenko's avatar Ivan Stepchenko Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table



[ Upstream commit 357445e2 ]

The function atomctrl_get_smc_sclk_range_table() does not check the return
value of smu_atom_get_data_table(). If smu_atom_get_data_table() fails to
retrieve SMU_Info table, it returns NULL which is later dereferenced.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

In practice this should never happen as this code only gets called
on polaris chips and the vbios data table will always be present on
those chips.

Fixes: a23eefa2 ("drm/amd/powerplay: enable dpm for baffin.")
Signed-off-by: default avatarIvan Stepchenko <sid@itb.spb.ru>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8f708a04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment