Skip to content

Commit

Permalink
drm/scheduler: always put last_sched fence in entity_fini
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pixel Ding authored and Alex Deucher committed May 15, 2018
1 parent 32d8c66 commit a4b3996
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/scheduler/gpu_scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a4b3996

Please sign in to comment.