drm/amd/pm: Fix memory some memory corruption
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 6 Jun 2023 08:33:46 +0000 (11:33 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:41:48 +0000 (12:41 -0400)
commitb7588507152148eaf0f19feb98c65b72ab40a726
tree127da41583118e31bbfdb1851ce5ab7a516f08b7
parentd155cfff48499d1e973976519ca81a7d9bab2cc3
drm/amd/pm: Fix memory some memory corruption

The "od_table" is a pointer to a large struct, but this code is doing
pointer math as if it were pointing to bytes.  It results in writing
far outside the struct.

Fixes: 2e8452ea4ef6 ("drm/amd/pm: fulfill the OD support for SMU13.0.0")
Fixes: 2a9aa52e4617 ("drm/amd/pm: fulfill the OD support for SMU13.0.7")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c