]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix invalid DPIA AUX reply causing system hang
authorStylon Wang <stylon.wang@amd.com>
Wed, 26 Oct 2022 13:00:40 +0000 (21:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Nov 2022 18:10:38 +0000 (13:10 -0500)
commit8d8494c3467d366eb0f7c8198dab80be8bdc47d2
tree8848738fd98d351602cee305163e53625b7c7b44
parent2c2911e09f19eac85df83b3201b38e69b8117059
drm/amd/display: Fix invalid DPIA AUX reply causing system hang

[Why]
Some DPIA AUX replies have incorrect data length from original request.
This could lead to overwriting of destination buffer if reply length is
larger, which could cause invalid access to stack since many destination
buffers are declared as local variables.

[How]
Check for invalid length from DPIA AUX replies and trigger a retry if
reply length is not the same as original request. A DRM_WARN() dmesg log
is also produced.

Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.0.x
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h