]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: Use virtual alloc during coredump
authorLijo Lazar <lijo.lazar@amd.com>
Wed, 29 Jul 2026 07:30:21 +0000 (13:00 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2026 18:32:44 +0000 (14:32 -0400)
commitb88a5a43c070df46939de419663d4679b90caf2f
treef1c2440c298b22cc8407a4fab024698d4248212e
parentfd37f9dd5b5ab70a46fa7bc76623c0528d602b27
drm/amdgpu: Use virtual alloc during coredump

The number of rings with outstanding fences can be large, requiring a
bigger allocation. Such allocations don't need to be physically
contiguous, so use kvzalloc/kvcalloc which fall back to vmalloc when
contiguous memory isn't available. This also matches the existing
kvfree used to free these allocations.

Also guard the allocation with ring_count to avoid passing 0 size to
allocation routines.

Fixes: eea85914d15b ("drm/amdgpu: save ring content before resetting the device")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 74d48bd6b7e12eba65de0507475b059966685ad1)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c