diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-02-14 03:47:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:53:06 -0400 |
commit | b9d022c630fa77c7044ea21e2597245a91e69856 (patch) | |
tree | a29b8b594153e96648f0237d40aaef4e4a79160d /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | c2c139cf435b18939204800fa72c53a7207bdd68 (diff) |
Revert "drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()"
This reverts commit 38fc4856ad98f230bc91da0421dec69e4aee40f8, which
introduces a use-after-free.
The underlying bug should be properly fixed with "drm/ttm: never add BO
that failed to validate to the LRU list".
Cc: zhoucm1 <david1.zhou@amd.com>
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index be80a4a68d7b..6a609a25b3fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -411,11 +411,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, | |||
411 | amdgpu_cs_report_moved_bytes(adev, | 411 | amdgpu_cs_report_moved_bytes(adev, |
412 | atomic64_read(&adev->num_bytes_moved) - initial_bytes_moved); | 412 | atomic64_read(&adev->num_bytes_moved) - initial_bytes_moved); |
413 | 413 | ||
414 | if (unlikely(r != 0)) { | 414 | if (unlikely(r != 0)) |
415 | if (!resv) | ||
416 | ww_mutex_unlock(&bo->tbo.resv->lock); | ||
417 | return r; | 415 | return r; |
418 | } | ||
419 | 416 | ||
420 | bo->tbo.priority = ilog2(bo->tbo.num_pages); | 417 | bo->tbo.priority = ilog2(bo->tbo.num_pages); |
421 | if (kernel) | 418 | if (kernel) |