1
0
Fork 0
alistair23-linux/drivers/gpu
Jason Gunthorpe 7da0d7a575 drm/amdgpu: Call find_vma under mmap_sem
[ Upstream commit a9ae8731e6 ]

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: 66c45500bf ("drm/amdgpu: use new HMM APIs and helpers")
Fixes: 0919195f2b ("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>
2020-01-04 19:18:22 +01:00
..
drm drm/amdgpu: Call find_vma under mmap_sem 2020-01-04 19:18:22 +01:00
host1x gpu: host1x: Allocate gather copy for host1x 2019-12-31 16:44:29 +01:00
ipu-v3 gpu: ipu-v3: image-convert: only sample into the next tile if necessary 2019-08-19 16:25:30 +02:00
vga topic/remove-fbcon-notifiers: 2019-06-26 12:26:34 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00