提交 b9d022c6 编写于 作者: N Nicolai Hähnle 提交者: Alex Deucher

Revert "drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()"

This reverts commit 38fc4856, 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: NNicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: NSamuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 c2c139cf
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册