]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Fix negative array index read
authorJesse Zhang <jesse.zhang@amd.com>
Tue, 30 Apr 2024 02:23:48 +0000 (10:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:32:05 +0000 (14:32 +0200)
commite549cd6da1f21c34ba0f65adeca6a8aa9860b381
treefd6606295bebd4b62c3fc6c2644732bd29e54016
parent91264238e9413d3f078b432765cc6830e2d5fe2a
drm/amd/pm: Fix negative array index read

commit c8c19ebf7c0b202a6a2d37a52ca112432723db5f upstream.

Avoid using the negative values
for clk_idex as an index into an array pptable->DpmDescriptor.

V2: fix clk_index return check (Tim Huang)

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[Minor conflict resolved due to code context change.]
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c