]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Oct 2024 20:52:08 +0000 (16:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:13:38 +0000 (13:13 +0100)
commitaaf6160a4b7f9ee3cd91aa5b3251f5dbe2170f42
treef7bee3b8dfc62b9caf522355d301581f10269b52
parent4596c0e4f76271b199df6678909cb3ce23c597ef
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()

commit 4d75b9468021c73108b4439794d69e892b1d24e3 upstream.

Avoid a possible buffer overflow if size is larger than 4K.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f5d873f5825b40d886d03bd2aede91d4cf002434)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c