summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2016-10-23 21:31:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-18 10:51:53 +0100
commit88a45e5d2c0d4bc2a79d33af411068992d07d564 (patch)
tree69c0e7aec20560aea1d2c2e2967229dd47bde220
parent25ed6e4b0b651d84cc88e1347d34d186f45146ec (diff)
downloadlwn-88a45e5d2c0d4bc2a79d33af411068992d07d564.tar.gz
lwn-88a45e5d2c0d4bc2a79d33af411068992d07d564.zip
drm/amdgpu: fix a vm_flush fence leak
commit 2d7c17be00e0dce3bc1a092a2c277a9f86c69ca9 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 80120fa4092c..e86ca392a08c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1654,5 +1654,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);
}
}