summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-11-12 16:22:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-04 19:18:22 +0100
commit7da0d7a575434fb82472a894960152c8c6b30347 (patch)
tree9309bcbbef6dfc5db6a70b7639b24acf8c60cc3e /tools
parent4f13232aa6370e09616563514ed7ef9d81c69f0e (diff)
downloadlinux-stable-7da0d7a575434fb82472a894960152c8c6b30347.tar.gz
linux-stable-7da0d7a575434fb82472a894960152c8c6b30347.tar.bz2
linux-stable-7da0d7a575434fb82472a894960152c8c6b30347.zip
drm/amdgpu: Call find_vma under mmap_sem
[ Upstream commit a9ae8731e6e52829a935d81a65d7f925cb95dbac ] 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/20191112202231.3856-11-jgg@ziepe.ca Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Tested-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions