]> git.itanic.dy.fi Git - linux-stable/commit
drm/amd/display: Guard against invalid RPTR/WPTR being set
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 13 Sep 2023 20:18:44 +0000 (16:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Nov 2023 05:46:01 +0000 (00:46 -0500)
commit1ffa8602e39b89469dc703ebab7a7e44c33da0f7
tree59f1617450516c4813a547a49963249042a6823f
parentb85ea95d086471afb4ad062012a4d73cd328fa86
drm/amd/display: Guard against invalid RPTR/WPTR being set

[WHY]
HW can return invalid values on register read, guard against these being
set and causing us to access memory out of range and page fault.

[HOW]
Guard at sync_inbox1 and guard at pushing commands.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c