]> git.baikalelectronics.ru Git - kernel.git/commit
drm/scheduler: Fix job cleanup without timeout handler
authorErico Nunes <nunes.erico@gmail.com>
Mon, 20 May 2019 23:16:49 +0000 (01:16 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 22 May 2019 06:42:50 +0000 (08:42 +0200)
commit7a41246f8de1bcd1d9a047fc84f21aa4732d3bc1
treebe917f9c0ae96cbba4cf845bf54f0650f3c23026
parente8f198adb1b84b696337f3a56de15ec5f90b9ef1
drm/scheduler: Fix job cleanup without timeout handler

After "91f13e4f38c6 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
drivers/gpu/drm/scheduler/sched_main.c