]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: Fix use-after-free race in VM acquire
authorAlysa Liu <Alysa.Liu@amd.com>
Thu, 5 Feb 2026 16:21:45 +0000 (11:21 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Mar 2026 16:50:44 +0000 (11:50 -0500)
commitc7c573275ec20db05be769288a3e3bb2250ec618
tree11cc807fe89c8c0797c58d0dcc75a3cd0362005a
parent8de9edb35976fa56565dc8fbb5d1310e8e10187c
drm/amdgpu: Fix use-after-free race in VM acquire

Replace non-atomic vm->process_info assignment with cmpxchg()
to prevent race when parent/child processes sharing a drm_file
both try to acquire the same VM after fork().

Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c