mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
drm/scheduler: Fix job cleanup without timeout handler
After "5918045c4e drm/scheduler: rework job destruction", jobs are
only deleted when the timeout handler is able to be cancelled
successfully.
In case no timeout handler is running (timeout == MAX_SCHEDULE_TIMEOUT),
job cleanup would be skipped which may result in memory leaks.
Add the handling for the (timeout == MAX_SCHEDULE_TIMEOUT) case in
drm_sched_cleanup_jobs.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/306025/?series=60878&rev=2
This commit is contained in:
parent
7793a10896
commit
794c686eb7
1 changed files with 2 additions and 1 deletions
|
|
@ -630,7 +630,8 @@ static void drm_sched_cleanup_jobs(struct drm_gpu_scheduler *sched)
|
|||
unsigned long flags;
|
||||
|
||||
/* Don't destroy jobs while the timeout worker is running */
|
||||
if (!cancel_delayed_work(&sched->work_tdr))
|
||||
if (sched->timeout != MAX_SCHEDULE_TIMEOUT &&
|
||||
!cancel_delayed_work(&sched->work_tdr))
|
||||
return;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue