Skip to content

Commit c21b400

Browse files
ChristianKoenigAMDgregkh
authored andcommitted
drm/ttm: fix memleak in ttm_transfered_destroy
commit 0db55f9 upstream. We need to cleanup the fences for ghost objects as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reported-by: Erhard F. <erhard_f@mailbox.org> Tested-by: Erhard F. <erhard_f@mailbox.org> Reviewed-by: Huang Rui <ray.huang@amd.com> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214029 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214447 CC: <stable@vger.kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20211020173211.2247-1-christian.koenig@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 69a7fa5 commit c21b400

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/ttm/ttm_bo_util.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)
322322
struct ttm_transfer_obj *fbo;
323323

324324
fbo = container_of(bo, struct ttm_transfer_obj, base);
325+
dma_resv_fini(&fbo->base.base._resv);
325326
ttm_bo_put(fbo->bo);
326327
kfree(fbo);
327328
}

0 commit comments

Comments
 (0)