diff options
author | Christian König <christian.koenig@amd.com> | 2016-02-08 04:57:22 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 14:07:52 -0500 |
commit | cc1de6e800c253172334f8774c419dc64401cd2e (patch) | |
tree | 40de20901e3f0d8b867d2682b6ed20d3a5e0f333 /drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |
parent | f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb (diff) |
drm/amdgpu: fix issue with overlapping userptrs
Otherwise we could try to evict overlapping userptr BOs in get_user_pages(),
leading to a possible circular locking dependency.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index b1969f2b2038..d4e2780c0796 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | |||
@@ -142,7 +142,8 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, | |||
142 | 142 | ||
143 | list_for_each_entry(bo, &node->bos, mn_list) { | 143 | list_for_each_entry(bo, &node->bos, mn_list) { |
144 | 144 | ||
145 | if (!bo->tbo.ttm || bo->tbo.ttm->state != tt_bound) | 145 | if (!amdgpu_ttm_tt_affect_userptr(bo->tbo.ttm, start, |
146 | end)) | ||
146 | continue; | 147 | continue; |
147 | 148 | ||
148 | r = amdgpu_bo_reserve(bo, true); | 149 | r = amdgpu_bo_reserve(bo, true); |