Skip to content

Commit d1e5ba8

Browse files
author
Philipp Stanner
committed
drm/sched: Warn if pending_list is not empty
drm_sched_fini() can leak jobs under certain circumstances. Warn if that happens. Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://lore.kernel.org/r/20250710125412.128476-7-phasta@kernel.org
1 parent c2668a0 commit d1e5ba8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/scheduler/sched_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,9 @@ void drm_sched_fini(struct drm_gpu_scheduler *sched)
14141414
sched->ready = false;
14151415
kfree(sched->sched_rq);
14161416
sched->sched_rq = NULL;
1417+
1418+
if (!list_empty(&sched->pending_list))
1419+
dev_warn(sched->dev, "Tearing down scheduler while jobs are pending!\n");
14171420
}
14181421
EXPORT_SYMBOL(drm_sched_fini);
14191422

0 commit comments

Comments
 (0)