1
0
Fork 0
alistair23-linux/drivers/gpu/drm/amd
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
..
acp treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
amdgpu drm/amdgpu: Call find_vma under mmap_sem 2020-01-04 19:18:22 +01:00
amdkfd drm/amdkfd: Fix MQD size calculation 2019-12-31 16:43:47 +01:00
display drm/amd/display: correctly populate dpp refclk in fpga 2019-12-31 16:44:23 +01:00
include drm/amd/display: update renoir_ip_offset.h 2019-09-17 14:22:29 -05:00
powerplay drm/amd/powerplay: fix struct init in renoir_print_clk_levels 2019-12-31 16:44:59 +01:00