]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: fix a vm_flush fence leak
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 23 Oct 2016 18:31:45 +0000 (21:31 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Oct 2016 21:00:51 +0000 (17:00 -0400)
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")
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 06f24322e7c31bcfbb9dc867909ebe234968accb..968c4260d7a7e0ccfa94f4a3f069acc9f73e1830 100644 (file)
@@ -1758,5 +1758,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);
        }
 }