NAK, the job->fence is assigned a reference just the line before: > job->fence = dma_fence_get(fence); When the fence ends up as a wild pointer in the SA we have a problem with fence reference counting somewhere, not a problem with freeing resources. Regards, Christian. Am 26.02.2018 um 06:18 schrieb Monk Liu: > if a job is go through scheduler, it is forbidden to > call job_free_resources after ib_schedule, becaust that > would assign wild pointer of fence on the sa_bo->fence > which could lead to weird bug > > Change-Id: Iad7ee011c641cb7357569cbce36fdc10f0ed911d > Signed-off-by: Monk Liu <Monk.Liu at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > index 2bd5676..7cb3437 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c > @@ -207,7 +207,6 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job) > dma_fence_put(job->fence); > job->fence = dma_fence_get(fence); > > - amdgpu_job_free_resources(job); > return fence; > } >