drm/amdgpu: fix potential overflow in fs_info.debugfs_name
authorStanley.Yang <Stanley.Yang@amd.com>
Mon, 11 May 2026 08:49:19 +0000 (16:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2026 14:40:33 +0000 (10:40 -0400)
commit1a58070fda26857a8f6acc0ab05428e60d5c6844
tree5472072eaed34e44bc01d689563362fb701ae6ba
parent1a66ceb98b137d18d303b9889f0e7d8c4db73943
drm/amdgpu: fix potential overflow in fs_info.debugfs_name

Use snprintf() with sizeof(fs_info.debugfs_name) so a long RAS block
name plus the "_err_inject" suffix cannot overflow the 32-byte buffer.

Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c