Re: [PATCH] drm/sched: Free the run queues at the end of drm_sched_fini()
From: Philipp Stanner
Date: Wed Sep 23 2026 - 03:37:36 EST
On Mon, 2026-09-14 at 13:11 +0100, Tvrtko Ursulin wrote:
>
> On 10/09/2026 13:16, Donggeun Yoo wrote:
> > drm_sched_fini() frees the run queues at the top of teardown but the array
> > holding them at the bottom. The early half is on the wrong side of
> > cancel_delayed_work_sync(&sched->work_tdr), which waits for a timeout
> > handler that can still walk sched->sched_rq[i] through
> > drm_sched_increase_karma().
> >
> > No correct driver can be there, since every fence returned from run_job()
> > must be signaled before drm_sched_fini() is called. Free the entries next
> > to the array anyway, so run-queue teardown happens in one place.
> >
> > Link: https://lore.kernel.org/dri-devel/20260910054605.634135-1-donggeunyoo.kernel@xxxxxxxxx/
> > Assisted-by: Claude:claude-fable-5
> > Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx>
> > ---
> > Targets drm-misc-next (0878e6053d01).
> >
[…]
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx>
Applied it. Thx.
P.