diff options
author | Christian König <christian.koenig@amd.com> | 2022-11-10 12:31:41 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-11-17 00:23:30 -0500 |
commit | fec8fdb54e8f74d88951c9f998f47bf4f2031fe0 (patch) | |
tree | 6488c4cbf8dedf902da012af243f8156d34a7be2 /drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | |
parent | 631945e04e1e243a503089f4487cad797476e8ca (diff) | |
download | linux-fec8fdb54e8f74d88951c9f998f47bf4f2031fe0.tar.bz2 |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h index 9caea1688fc3..e4d78491bcc7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h @@ -26,6 +26,8 @@ #include <drm/ttm/ttm_execbuf_util.h> #include <drm/amdgpu_drm.h> +struct hmm_range; + struct amdgpu_device; struct amdgpu_bo; struct amdgpu_bo_va; @@ -36,6 +38,7 @@ struct amdgpu_bo_list_entry { struct amdgpu_bo_va *bo_va; uint32_t priority; struct page **user_pages; + struct hmm_range *range; bool user_invalidated; }; |