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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
>   		}




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux