diff options
| author | Nicolai Hähnle <[email protected]> | 2017-02-14 08:47:36 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-03-30 03:53:06 +0000 |
| commit | b9d022c630fa77c7044ea21e2597245a91e69856 (patch) | |
| tree | a29b8b594153e96648f0237d40aaef4e4a79160d /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/ttm: never add BO that failed to validate to the LRU list (diff) | |
| download | kernel-b9d022c630fa77c7044ea21e2597245a91e69856.tar.gz kernel-b9d022c630fa77c7044ea21e2597245a91e69856.zip | |
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 <[email protected]>
Signed-off-by: Nicolai Hähnle <[email protected]>
Tested-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
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, amdgpu_cs_report_moved_bytes(adev, atomic64_read(&adev->num_bytes_moved) - initial_bytes_moved); - if (unlikely(r != 0)) { - if (!resv) - ww_mutex_unlock(&bo->tbo.resv->lock); + if (unlikely(r != 0)) return r; - } bo->tbo.priority = ilog2(bo->tbo.num_pages); if (kernel) |
