提交 0d2bd2ae 编写于 作者: C Christian König 提交者: Alex Deucher

drm/ttm: fix memory leak while individualizing BOs

We need to free the reservation object before we take the BO
from the delayed delete list.
Signed-off-by: NChristian König <christian.koenig@amd.com>
Reviewed-by: NMonk Liu <monk.liu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 c09312a6
...@@ -557,6 +557,8 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo, ...@@ -557,6 +557,8 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
} }
ttm_bo_del_from_lru(bo); ttm_bo_del_from_lru(bo);
if (!list_empty(&bo->ddestroy) && (bo->resv != &bo->ttm_resv))
reservation_object_fini(&bo->ttm_resv);
list_del_init(&bo->ddestroy); list_del_init(&bo->ddestroy);
kref_put(&bo->list_kref, ttm_bo_ref_bug); kref_put(&bo->list_kref, ttm_bo_ref_bug);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册