diff options
| author | Jason Gunthorpe <[email protected]> | 2019-11-12 20:22:27 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2019-11-23 23:56:44 +0000 |
| commit | a9ae8731e6e52829a935d81a65d7f925cb95dbac (patch) | |
| tree | 8c3d59c16a99e2c3403b99fc6c1f938275d09e81 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | nouveau: use mmu_interval_notifier instead of hmm_mirror (diff) | |
| download | kernel-a9ae8731e6e52829a935d81a65d7f925cb95dbac.tar.gz kernel-a9ae8731e6e52829a935d81a65d7f925cb95dbac.zip | |
drm/amdgpu: Call find_vma under mmap_sem
find_vma() must be called under the mmap_sem, reorganize this code to
do the vma check after entering the lock.
Further, fix the unlocked use of struct task_struct's mm, instead use
the mm from hmm_mirror which has an active mm_grab. Also the mm_grab
must be converted to a mm_get before acquiring mmap_sem or calling
find_vma().
Fixes: 66c45500bfdc ("drm/amdgpu: use new HMM APIs and helpers")
Fixes: 0919195f2b0d ("drm/amdgpu: Enable amdgpu_ttm_tt_get_user_pages in worker threads")
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Christian König <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Reviewed-by: Philip Yang <[email protected]>
Tested-by: Philip Yang <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions
