[PATCH] drm/amdgpu: fix fence memory leak in wait_all_fence V2

Chunming Zhou David1.Zhou at amd.com
Fri Apr 7 09:07:53 UTC 2017


V2: remove **array method, directly fence_put after fence wait.

Change-Id: Idde3f929cbe4fe8063a7b913e361d6d8bc2745dc
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index de1c4c3..c939374 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1230,6 +1230,7 @@ static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev,
 			continue;
 
 		r = kcl_fence_wait_timeout(fence, true, timeout);
+		fence_put(fence);
 		if (r < 0)
 			return r;
 
-- 
1.9.1



More information about the amd-gfx mailing list