]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: fix smu table id bound check issue in smu_cmn_update_table()
authorYang Wang <kevinyang.wang@amd.com>
Wed, 22 Oct 2025 06:12:21 +0000 (14:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Oct 2025 15:02:03 +0000 (11:02 -0400)
commit238d468d3ed18a324bb9d8c99f18c665dbac0511
tree813b6841b83ebd618ed188fb5770a61379d3c1db
parent382bd6a792836875da555fe9a2b51222b813fed1
drm/amd/pm: fix smu table id bound check issue in smu_cmn_update_table()

'table_index' is a variable defined by the smu driver (kmd)
'table_id' is a variable defined by the hw smu (pmfw)

This code should use table_index as a bounds check.

Fixes: caad2613dc4bd ("drm/amd/powerplay: move table setting common code to smu_cmn.c")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit fca0c66b22303de0d1d6313059baf4dc960a4753)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c