]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix userptr HMM range handling v2
authorChristian König <christian.koenig@amd.com>
Thu, 10 Nov 2022 11:31:41 +0000 (12:31 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Nov 2022 21:40:30 +0000 (16:40 -0500)
commitcac81d5ea850da5251e8ba03aa81298dfa418382
tree3454147c011dc374d1a87ad8c541a2fe6141f267
parente574c2cd8a6de5804b14b0d7c5fb0e24e39bd4a1
drm/amdgpu: fix userptr HMM range handling v2

The basic problem here is that it's not allowed to page fault while
holding the reservation lock.

So it can happen that multiple processes try to validate an userptr
at the same time.

Work around that by putting the HMM range object into the mutex
protected bo list for now.

v2: make sure range is set to NULL in case of an error

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h