Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f45dc10a authored by Trek's avatar Trek Committed by Greg Kroah-Hartman
Browse files

drm/amdgpu: Check for valid number of registers to read

[ Upstream commit 13238d4fa6764fa74dcf863d5f2227765b3753eb ]

Do not try to allocate any amount of memory requested by the user.
Instead limit it to 128 registers. Actually the longest series of
consecutive allowed registers are 48, mmGB_TILE_MODE0-31 and
mmGB_MACROTILE_MODE0-15 (0x2644-0x2673).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=111273


Signed-off-by: default avatarTrek <trek00@inbox.ru>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 90aa9135
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment