drm/amdgpu: fix fence memory leak in wait_all_fence V2
authorChunming Zhou <David1.Zhou@amd.com>
Fri, 7 Apr 2017 09:05:45 +0000 (17:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Apr 2017 19:15:45 +0000 (15:15 -0400)
V2: remove **array method, directly fence_put after fence wait.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <chrstian.koenig@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index 9cd4e1e05b973bdf6ad3574cebeaee1bb3334187..ec71b93205616a980ed4b32d406e538b20e676dd 100644 (file)
@@ -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;