diff options
author | Pixel Ding <Pixel.Ding@amd.com> | 2018-04-18 04:33:26 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 13:43:30 -0500 |
commit | a4b3996aeebbaafd2682f4db06bb5659e1653da7 (patch) | |
tree | 5bcc132525c657e719075f3d18b7e9f9ddc28970 /drivers | |
parent | 32d8c6620d49779600714f197611856ed503a7a5 (diff) |
drm/scheduler: always put last_sched fence in entity_fini
Fix the potential memleak since scheduler main thread always
hold one last_sched fence.
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/scheduler/gpu_scheduler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 44d21981bf3b..4968867da7a6 100644 --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c @@ -276,10 +276,10 @@ void drm_sched_entity_cleanup(struct drm_gpu_scheduler *sched, else if (r) DRM_ERROR("fence add callback failed (%d)\n", r); } - - dma_fence_put(entity->last_scheduled); - entity->last_scheduled = NULL; } + + dma_fence_put(entity->last_scheduled); + entity->last_scheduled = NULL; } EXPORT_SYMBOL(drm_sched_entity_cleanup); |