]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Check for valid number of registers to read
authorTrek <trek00@inbox.ru>
Sat, 31 Aug 2019 19:25:36 +0000 (21:25 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2019 15:42:56 +0000 (10:42 -0500)
commit3f457afb33f42c905aca1b80b8661c5cb9ddcc39
treee9fd7081de784563e3a5ffd52c8239bfbd5e7102
parent05e388846489a4fd6b14b78a519e1c7f135e52c4
drm/amdgpu: Check for valid number of registers to read

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: Trek <trek00@inbox.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c