]> 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)
commit12ee882fae49d5361f115f8db9a2bd768cdfe5c8
tree3454147c011dc374d1a87ad8c541a2fe6141f267
parent3b91c5cd7667c4d651124fe18e440f225470beec
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