diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-11-14 09:48:06 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-16 19:35:48 +0100 |
commit | 9ee8ecbb3eafeb1a899eaba1329ba3c4c092b754 (patch) | |
tree | 2dad0d6a2dcf9d8d3ce8845d44f332e98718dc53 /drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | |
parent | drm/amd/pp: fix dpm randomly failed on Vega10 (diff) | |
download | linux-9ee8ecbb3eafeb1a899eaba1329ba3c4c092b754.tar.xz linux-9ee8ecbb3eafeb1a899eaba1329ba3c4c092b754.zip |
drm/amdgpu:fix memleak in takedown
this can fix the memory leak under the case that not all
BO are freed during "takedown" stage, because originally
it blocks following kfree on mgr.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c index 33535d347734..00e0ce10862f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c @@ -71,12 +71,6 @@ static int amdgpu_gtt_mgr_fini(struct ttm_mem_type_manager *man) { struct amdgpu_gtt_mgr *mgr = man->priv; - spin_lock(&mgr->lock); - if (!drm_mm_clean(&mgr->mm)) { - spin_unlock(&mgr->lock); - return -EBUSY; - } - drm_mm_takedown(&mgr->mm); spin_unlock(&mgr->lock); kfree(mgr); |