]> 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 18:15:00 +0000 (13:15 -0500)
commit2c1030f2e84885cc58bffef6af67d5b9d2e7098f
tree5ef78e0cff86d60a21307ed411dc19df85963872
parent68785c5e79e0fc1eacf63026fbba32be3867f410
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>
(cherry picked from commit c7c573275ec20db05be769288a3e3bb2250ec618)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c