drm/nouveau: sched: fix leaking memory of timedout job
authorDanilo Krummrich <dakr@redhat.com>
Sat, 16 Sep 2023 16:28:31 +0000 (18:28 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Tue, 19 Sep 2023 22:15:50 +0000 (00:15 +0200)
commit31499b0192cea06bbfe2782f288ac5cfe3dc9167
tree849beb5c09475a433f9a67821a92c274b24b2cdb
parent7ece3fc9b76b2d4596607fd8751f36c4e5f1f072
drm/nouveau: sched: fix leaking memory of timedout job

Always stop and re-start the scheduler in order to let the scheduler
free up the timedout job in case it got signaled. In case of exec jobs
the job type specific callback will take care to signal all fences and
tear down the channel.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230916162835.5719-1-dakr@redhat.com
drivers/gpu/drm/nouveau/nouveau_exec.c
drivers/gpu/drm/nouveau/nouveau_sched.c