Skip to contentSkip to conversation

drm/amdgpu: fix fence memory leak in wait_all_fence V2

PATCH In review Chunming Zhou 2 participants 2 messages Apr 7, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

Change-Id Idde3f929cbe4fe8063a7b913e361d6d8bc2745dc
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -0
index de1c4c3..c939374 100644
@@ -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;
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1491556073-20459-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 07.04.2017 um 11:07 schrieb Chunming Zhou:

Quoted 4 lines

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

Change-Id Idde3f929cbe4fe8063a7b913e361d6d8bc2745dc
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -0
index de1c4c3..c939374 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c static int amdgpu_cs_wait_all_fences(struct amdgpu_device *adev, · line 1236

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -0
@@ -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;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx