From: Chunming Zhou Date: Fri, 7 Apr 2017 09:05:45 +0000 (+0800) Subject: drm/amdgpu: fix fence memory leak in wait_all_fence V2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32df87dff04833bbf53f1750f6c6048192ed29bf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: fix fence memory leak in wait_all_fence V2 V2: remove **array method, directly fence_put after fence wait. Signed-off-by: Chunming Zhou Reviewed-by: Christian König Reviewed-by: Ken Wang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 9cd4e1e05b97..ec71b9320561 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1242,6 +1242,7 @@ static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev, continue; r = dma_fence_wait_timeout(fence, true, timeout); + dma_fence_put(fence); if (r < 0) return r;