mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c09312a653
commit
0d2bd2ae04
@ -557,6 +557,8 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *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);
|
||||
kref_put(&bo->list_kref, ttm_bo_ref_bug);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user