]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: Fix GPR read from debugfs (v2)
authorTom St Denis <tom.stdenis@amd.com>
Tue, 10 Mar 2020 12:40:41 +0000 (08:40 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Mar 2020 13:20:31 +0000 (09:20 -0400)
commitd1447b027e91b5144167b7521066d010b9a8f07a
treec1e6708156fe3be825454aa1a37ee9d7ad3ddb99
parent3a32af18a73f06a472578a1434a8fca7fa494ea3
drm/amd/amdgpu: Fix GPR read from debugfs (v2)

The offset into the array was specified in bytes but should
be in terms of 32-bit words.  Also prevent large reads that
would also cause a buffer overread.

v2:  Read from correct offset from internal storage buffer.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c