Skip to contentSkip to conversation

drm/ttm:fix memory leak due to individualize

PATCH In review Monk Liu 3 participants 3 messages Oct 23, 2017 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/1 drm/ttm:fix memory leak due to individualize

Change-Id I6d06b81b8b894775e55e495e96f3c999b83cf2be
---
 drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +4 -1
index 97125cb..3c9c0d9 100644
@@ -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;
 		}
Signature · 6 lines
2.7.4

_______________________________________________
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): 1508725896-6092-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 23.10.2017 um 04:31 schrieb Monk Liu:

Quoted 2 lines
Change-Id I6d06b81b8b894775e55e495e96f3c999b83cf2be
Quoted 11 lines
---
  drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +0 -0
index 97125cb..3c9c0d9 100644
@@ -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);

drivers/gpu/drm/ttm/ttm_bo.c static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo) · line 470

Quoted 10 lines
drivers/gpu/drm/ttm/ttm_bo.c +4 -1
  			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;
  		}

_______________________________________________
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): 036d39f9-01ef-3515-7ef5-abfffd62d786-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Monday, October 23, 2017 3:06 AM
To: Liu, Monk; [email protected]
Subject: Re: [PATCH] drm/ttm:fix memory leak due to individualize

Am 23.10.2017 um 04:31 schrieb Monk Liu:

Quoted 2 lines
Change-Id I6d06b81b8b894775e55e495e96f3c999b83cf2be

Please provide a better patch title and description.

Alex

Quoted 25 lines

Review

Quoted 5 lines
---
  drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/ttm/ttm_bo.c

drivers/gpu/drm/ttm/ttm_bo.c static void ttm_bo_cleanup_refs_or_queue(struct

Quoted 4 lines

index 97125cb..3c9c0d9 100644

drivers/gpu/drm/ttm/ttm_bo.c +0 -0
@@ -460,8 +460,11 @@ static void ttm_bo_cleanup_refs_or_queue(struct

ttm_buffer_object *bo)

drivers/gpu/drm/ttm/ttm_bo.c static void ttm_bo_cleanup_refs_or_queue(struct · line 460

Quoted 1 line
drivers/gpu/drm/ttm/ttm_bo.c +0 -0
  		if (reservation_object_test_signaled_rcu(&bo->ttm_resv,

true)) {

Quoted 9 lines
drivers/gpu/drm/ttm/ttm_bo.c +4 -1
  			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);
Quoted 8 lines

drivers/gpu/drm/ttm/ttm_bo.c static void ttm_bo_cleanup_refs_or_queue(struct · line 470

Quoted 2 lines
drivers/gpu/drm/ttm/ttm_bo.c +0 -0
  			return;
  		}

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

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