]> Gentwo Git Trees - linux/.git/commit
drm/amdkfd: Fix kfd process ref leaking when userptr unmapping
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 27 May 2025 15:09:53 +0000 (11:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Oct 2025 18:09:06 +0000 (14:09 -0400)
commit58e6fc2fb94f0f409447e5d46cf6a417b6397fbc
tree72e0cf238e68fdb3591790fc2c4521272a0bdec2
parent0c6734288566f9642037882c4cb1684d5ecc6b57
drm/amdkfd: Fix kfd process ref leaking when userptr unmapping

kfd_lookup_process_by_pid hold the kfd process reference to ensure it
doesn't get destroyed while sending the segfault event to user space.

Calling kfd_lookup_process_by_pid as function parameter leaks the kfd
process refcount and miss the NULL pointer check if app process is
already destroyed.

Fixes: 2d274bf7099b ("amd/amdkfd: Trigger segfault for early userptr unmmapping")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c