Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd99782f authored by Christian König's avatar Christian König Committed by Greg Kroah-Hartman
Browse files

drm/ttm: fix memleak in ttm_transfered_destroy



commit 0db55f9a1bafbe3dac750ea669de9134922389b5 upstream.

We need to cleanup the fences for ghost objects as well.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reported-by: default avatarErhard F. <erhard_f@mailbox.org>
Tested-by: default avatarErhard F. <erhard_f@mailbox.org>
Reviewed-by: default avatarHuang 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2c64ebc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -463,6 +463,7 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo)
	struct ttm_transfer_obj *fbo;

	fbo = container_of(bo, struct ttm_transfer_obj, base);
	dma_resv_fini(&fbo->base.base._resv);
	ttm_bo_put(fbo->bo);
	kfree(fbo);
}