Re: [PATCH v4 04/14] drm/sched: Cancel and flush all oustatdning jobs before finish.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 18, 2021 at 4:02 PM Andrey Grodzovsky
<andrey.grodzovsky@xxxxxxx> wrote:
>
> To avoid any possible use after free.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@xxxxxxx>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>

In the subject:
oustatdning -> outstanding

Alex


> ---
>  drivers/gpu/drm/scheduler/sched_main.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 997aa15..92637b7 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -899,6 +899,9 @@ void drm_sched_fini(struct drm_gpu_scheduler *sched)
>         if (sched->thread)
>                 kthread_stop(sched->thread);
>
> +       /* Confirm no work left behind accessing device structures */
> +       cancel_delayed_work_sync(&sched->work_tdr);
> +
>         sched->ready = false;
>  }
>  EXPORT_SYMBOL(drm_sched_fini);
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux