linux/drivers/gpu
Ivan Stepchenko 2396bc9193 drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table
[ Upstream commit 357445e28f ]

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: a23eefa2f4 ("drm/amd/powerplay: enable dpm for baffin.")
Signed-off-by: Ivan Stepchenko <sid@itb.spb.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-03-13 12:49:52 +01:00
..
drm drm/amdgpu: Fix potential NULL pointer dereference in atomctrl_get_smc_sclk_range_table 2025-03-13 12:49:52 +01:00
host1x gpu: host1x: Do not setup DMA for virtual devices 2024-05-17 11:50:54 +02:00
ipu-v3 gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id() 2023-03-10 09:39:20 +01:00
trace gpu/trace: add a gpu total memory usage tracepoint 2020-03-03 17:52:41 -05:00
vga vgaarb: don't pass a cookie to vga_client_register 2021-07-21 10:29:10 +02:00
Makefile gpu/trace: add a gpu total memory usage tracepoint 2020-03-03 17:52:41 -05:00