[PATCH] drm/ttm:fix memory leak due to individualize

Christian König ckoenig.leichtzumerken at gmail.com
Mon Oct 23 07:05:34 UTC 2017


Am 23.10.2017 um 04:31 schrieb Monk Liu:
> Change-Id: I6d06b81b8b894775e55e495e96f3c999b83cf2be
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 97125cb..3c9c0d9 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -460,8 +460,11 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
>   		if (reservation_object_test_signaled_rcu(&bo->ttm_resv, true)) {
>   			ttm_bo_del_from_lru(bo);
>   			spin_unlock(&glob->lru_lock);
> -			if (bo->resv != &bo->ttm_resv)
> +			if (bo->resv != &bo->ttm_resv) {
>   				reservation_object_unlock(&bo->ttm_resv);
> +				reservation_object_fini(&bo->ttm_resv);
> +			}
> +
>   			ttm_bo_cleanup_memtype_use(bo);
>   			return;
>   		}




More information about the amd-gfx mailing list