Skip to contentSkip to conversation

drm/amdgpu: fix a vm_flush fence leak

PATCH Applied Grazvydas Ignotas 4 participants 4 messages Oct 23, 2016 – Oct 24, 2016 1 message not in the archive

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

PATCH 1/1 drm/amdgpu: fix a vm_flush fence leak

Looks like .last_flush reference is left at teardown. Leak reported by CONFIG_SLUB_DEBUG.

Fixes 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
index ded57dd..d6c2839 100644
@@ -1774,5 +1774,6 @@ void amdgpu_vm_manager_fini(struct amdgpu_device *adev)
 		fence_put(adev->vm_manager.ids[i].first);
 		amdgpu_sync_free(&adev->vm_manager.ids[i].active);
 		fence_put(id->flushed_updates);
+		fence_put(id->last_flush);
 	}
 }
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): 1477247507-11378-3-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by Chunming Zhou
#2 lore raw
Quoted 5 lines · Grazvydas Ignotas

Looks like .last_flush reference is left at teardown. Leak reported by CONFIG_SLUB_DEBUG.

Fixes 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush")
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index ded57dd..d6c2839 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_manager_fini(struct amdgpu_device *adev) · line 1779

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -1774,5 +1774,6 @@ void amdgpu_vm_manager_fini(struct amdgpu_device *adev)
  		fence_put(adev->vm_manager.ids[i].first);
  		amdgpu_sync_free(&adev->vm_manager.ids[i].active);
  		fence_put(id->flushed_updates);
+		fence_put(id->last_flush);
  	}
  }

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

Reviewed-by
#3 lore raw

Am 24.10.2016 um 04:32 schrieb zhoucm1:

Quoted 9 lines · Grazvydas Ignotas
Quoted 5 lines

Looks like .last_flush reference is left at teardown. Leak reported by CONFIG_SLUB_DEBUG.

Fixes 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush")
Quoted 13 lines
Quoted 13 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index ded57dd..d6c2839 100644
@@ -1774,5 +1774,6 @@ void amdgpu_vm_manager_fini(struct 
 amdgpu_device *adev)
          fence_put(adev->vm_manager.ids[i].first);
 amdgpu_sync_free(&adev->vm_manager.ids[i].active);
          fence_put(id->flushed_updates);
Quoted 8 lines
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
+        fence_put(id->last_flush);
      }
  }

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

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

Applied
#4 lore raw
Quoted 21 lines · Christian König

Am 24.10.2016 um 04:32 schrieb zhoucm1:

Quoted 12 lines · Grazvydas Ignotas
Quoted 6 lines

Looks like .last_flush reference is left at teardown. Leak reported by CONFIG_SLUB_DEBUG.

Fixes 41d9eb2c5a2a ("drm/amdgpu: add a fence after the VM flush")
Quoted 4 lines
Quoted 4 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index ded57dd..d6c2839 100644
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -0
@@ -1774,5 +1774,6 @@ void amdgpu_vm_manager_fini(struct amdgpu_device
 *adev)
          fence_put(adev->vm_manager.ids[i].first);
 amdgpu_sync_free(&adev->vm_manager.ids[i].active);
          fence_put(id->flushed_updates);
+        fence_put(id->last_flush);
      }
  }

Applied. Thanks!

Alex
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel