drm/amdgpu: don't access invalid sched
Subsystems (2)
PATCH 1/3 drm/amdgpu: don't access invalid sched
Since 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()") accessing job->base.sched can produce unexpected results as the initialisation of (*job)->base.sched done in amdgpu_job_alloc is overwritten by the memset.
This commit fixes an issue when a CS would fail validation and would be rejected after job->num_ibs is incremented. In this case, amdgpu_ib_free(ring->adev, ...) will be called, which would crash the machine because the ring value is bogus.
To fix this, pass a NULL pointer to amdgpu_ib_free(): we can do this because the device is actually not used in this function.
The next commit will remove the ring argument completely.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -2
@@ -256,7 +256,6 @@ void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,void amdgpu_job_free_resources (struct amdgpu_job *job) { -struct amdgpu_ring *ring =to_amdgpu_ring (job->base.sched);struct dma_fence *f;unsigned i;
@@ -269,7 +268,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job) f =NULL ;for (i =0 ; i < job->num_ibs; ++i) -amdgpu_ib_free (ring->adev, &job->ibs[i], f); +amdgpu_ib_free (NULL , &job->ibs[i], f); }static void amdgpu_job_free_cb (struct drm_sched_job *s_job)
Signature · 1 line
2.43.0
PATCH 2/3 drm/amdgpu: drop the amdgpu_device argument from amdgpu_ib_free
It's unused.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- 27 files changed, 40 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -4
@@ -89,16 +89,14 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,/** * amdgpu_ib_free - free an IB (Indirect Buffer) * -* @adev: amdgpu_device pointer * @ib: IB object to free * @f: the fence SA bo need wait on for the ib alloation * * Free an IB (all asics). */ -void amdgpu_ib_free (struct amdgpu_device *adev,struct amdgpu_ib *ib, -struct dma_fence *f) +void amdgpu_ib_free (struct amdgpu_ib *ib,struct dma_fence *f) { -amdgpu_sa_bo_free (adev, &ib->sa_bo, f); +amdgpu_sa_bo_free (&ib->sa_bo, f); }/**
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -1
@@ -268,7 +268,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job) f =NULL ;for (i =0 ; i < job->num_ibs; ++i) -amdgpu_ib_free (NULL , &job->ibs[i], f); +amdgpu_ib_free (&job->ibs[i], f); }static void amdgpu_job_free_cb (struct drm_sched_job *s_job)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 -2
@@ -342,8 +342,7 @@ int amdgpu_sa_bo_manager_start(struct amdgpu_device *adev,int amdgpu_sa_bo_new (struct amdgpu_sa_manager *sa_manager,struct drm_suballoc **sa_bo,unsigned int size); -void amdgpu_sa_bo_free (struct amdgpu_device *adev, -struct drm_suballoc **sa_bo, +void amdgpu_sa_bo_free (struct drm_suballoc **sa_bo,struct dma_fence *fence);#if defined(CONFIG_DEBUG_FS ) void amdgpu_sa_bo_dump_debug_info(struct amdgpu_sa_manager *sa_manager,
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -2
@@ -462,8 +462,7 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,unsigned size, enum amdgpu_ib_pool_type pool, struct amdgpu_ib *ib); -void amdgpu_ib_free (struct amdgpu_device *adev,struct amdgpu_ib *ib, -struct dma_fence *f); +void amdgpu_ib_free (struct amdgpu_ib *ib,struct dma_fence *f);int amdgpu_ib_schedule (struct amdgpu_ring *ring,unsigned num_ibs,struct amdgpu_ib *ibs,struct amdgpu_job *job,struct dma_fence **f);
drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c +1 -2
@@ -93,8 +93,7 @@ int amdgpu_sa_bo_new(struct amdgpu_sa_manager *sa_manager,return 0 ; } -void amdgpu_sa_bo_free (struct amdgpu_device *adev,struct drm_suballoc **sa_bo, -struct dma_fence *fence) +void amdgpu_sa_bo_free (struct drm_suballoc **sa_bo,struct dma_fence *fence) {if (sa_bo ==NULL || *sa_bo ==NULL ) {return ;
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +1 -1
@@ -503,7 +503,7 @@ static int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, ib->ptr[i] =0x0 ; r =amdgpu_job_submit_direct (job, ring, &f); -amdgpu_ib_free (ring->adev, &ib_msg, f); +amdgpu_ib_free (&ib_msg, f);if (r) goto err;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +5 -5
@@ -586,7 +586,7 @@ static int amdgpu_vcn_dec_send_msg(struct amdgpu_ring *ring,if (r) goto err_free; -amdgpu_ib_free (adev, ib_msg, f); +amdgpu_ib_free (ib_msg, f);if (fence) *fence =dma_fence_get (f);
@@ -597,7 +597,7 @@ static int amdgpu_vcn_dec_send_msg(struct amdgpu_ring *ring, err_free:amdgpu_job_free (job); err: -amdgpu_ib_free (adev, ib_msg, f); +amdgpu_ib_free (ib_msg, f);return r; }
@@ -779,7 +779,7 @@ static int amdgpu_vcn_dec_sw_send_msg(struct amdgpu_ring *ring,if (r) goto err_free; -amdgpu_ib_free (adev, ib_msg, f); +amdgpu_ib_free (ib_msg, f);if (fence) *fence =dma_fence_get (f);
@@ -790,7 +790,7 @@ static int amdgpu_vcn_dec_sw_send_msg(struct amdgpu_ring *ring, err_free:amdgpu_job_free (job); err: -amdgpu_ib_free (adev, ib_msg, f); +amdgpu_ib_free (ib_msg, f);return r; }
@@ -1020,7 +1020,7 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout) r =0 ; error: -amdgpu_ib_free (adev, &ib, fence); +amdgpu_ib_free (&ib, fence);dma_fence_put (fence);return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -1
@@ -834,7 +834,7 @@ static int vpe_ring_test_ib(struct amdgpu_ring *ring, long timeout) ret = (le32_to_cpu (adev->wb.wb[index]) == test_pattern) ?0 : -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 -1
@@ -698,7 +698,7 @@ static int cik_sdma_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -1
@@ -4036,7 +4036,7 @@ static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)else r = -EINVAL ; err2: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -1
@@ -617,7 +617,7 @@ static int gfx_v11_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err2:if (!ring->is_mes_queue) -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1 -1
@@ -515,7 +515,7 @@ static int gfx_v12_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err2:if (!ring->is_mes_queue) -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1 -1
@@ -1910,7 +1910,7 @@ static int gfx_v6_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; error: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -2330,7 +2330,7 @@ static int gfx_v7_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; error: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f);return r; }
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -2
@@ -914,7 +914,7 @@ static int gfx_v8_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err2: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:amdgpu_device_wb_free (adev, index);
@@ -1656,7 +1656,7 @@ static int gfx_v8_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)RREG32 (sec_ded_counter_registers[i]); fail: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f);return r;
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -2
@@ -1243,7 +1243,7 @@ static int gfx_v9_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err2: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:amdgpu_device_wb_free (adev, index);
@@ -4788,7 +4788,7 @@ static int gfx_v9_0_do_edc_gpr_workarounds(struct amdgpu_device *adev) } fail: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f);return r;
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +7 -7
@@ -412,7 +412,7 @@ static int gfx_v9_4_2_run_shader(struct amdgpu_device *adev, r =amdgpu_ib_schedule (ring,1 , ib,NULL , fence_ptr);if (r) {dev_err (adev->dev,"ib submit failed (%d).\n" , r); -amdgpu_ib_free (adev, ib,NULL ); +amdgpu_ib_free (ib,NULL ); }return r; }
@@ -611,16 +611,16 @@ static int gfx_v9_4_2_do_sgprs_init(struct amdgpu_device *adev) } disp2_failed: -amdgpu_ib_free (adev, &disp_ibs[2 ],NULL ); +amdgpu_ib_free (&disp_ibs[2 ],NULL );dma_fence_put (fences[2 ]); disp1_failed: -amdgpu_ib_free (adev, &disp_ibs[1 ],NULL ); +amdgpu_ib_free (&disp_ibs[1 ],NULL );dma_fence_put (fences[1 ]); disp0_failed: -amdgpu_ib_free (adev, &disp_ibs[0 ],NULL ); +amdgpu_ib_free (&disp_ibs[0 ],NULL );dma_fence_put (fences[0 ]); pro_end: -amdgpu_ib_free (adev, &wb_ib,NULL ); +amdgpu_ib_free (&wb_ib,NULL );if (r)dev_info (adev->dev,"Init SGPRS Failed\n" );
@@ -687,10 +687,10 @@ static int gfx_v9_4_2_do_vgprs_init(struct amdgpu_device *adev) } disp_failed: -amdgpu_ib_free (adev, &disp_ib,NULL ); +amdgpu_ib_free (&disp_ib,NULL );dma_fence_put (fence); pro_end: -amdgpu_ib_free (adev, &wb_ib,NULL ); +amdgpu_ib_free (&wb_ib,NULL );if (r)dev_info (adev->dev,"Init VGPRS Failed\n" );
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -1
@@ -503,7 +503,7 @@ static int gfx_v9_4_3_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err2: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err1:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +1 -1
@@ -633,7 +633,7 @@ static int sdma_v2_4_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -1
@@ -906,7 +906,7 @@ static int sdma_v3_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)else r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -1565,7 +1565,7 @@ static int sdma_v4_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +1 -1
@@ -1130,7 +1130,7 @@ static int sdma_v4_4_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
@@ -1194,7 +1194,7 @@ static int sdma_v5_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -1
@@ -1050,7 +1050,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +1 -1
@@ -1067,7 +1067,7 @@ static int sdma_v6_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +1 -1
@@ -1064,7 +1064,7 @@ static int sdma_v7_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:if (!ring->is_mes_queue)
drivers/gpu/drm/amd/amdgpu/si_dma.c +1 -1
@@ -286,7 +286,7 @@ static int si_dma_ring_test_ib(struct amdgpu_ring *ring, long timeout) r = -EINVAL ; err1: -amdgpu_ib_free (adev, &ib,NULL ); +amdgpu_ib_free (&ib,NULL );dma_fence_put (f); err0:amdgpu_device_wb_free (adev, index);
Signature · 1 line
2.43.0
PATCH 3/3 drm/amdgpu: remove useless init from amdgpu_job_alloc
In reply to Pierre-Eric Pelloux-PrayerThis init is useless because base.sched will be cleared to 0 in drm_sched_job_init because of 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()").
--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -5
@@ -198,11 +198,6 @@ int amdgpu_job_alloc(struct amdgpu_device *adev, struct amdgpu_vm *vm,if (!*job)return -ENOMEM ; -/* -* Initialize the scheduler to at least some ring so that we always -* have a pointer to adev. -*/ - (*job)->base.sched = &adev->rings[0 ]->sched; (*job)->vm = vm;amdgpu_sync_create (&(*job)->explicit_sync);
Signature · 1 line
2.43.0
Quoted 11 lines · Pierre-Eric Pelloux-Prayer
Since
2320c9e6a768("drm/sched:memset()'job' indrm_sched_job_init()") accessingjob->base.schedcan produce unexpected results as the initialisation of (*job)->base.sched done inamdgpu_job_allocis overwritten by the memset.This commit fixes an issue when a CS would fail validation and would be rejected after
job->num_ibsis incremented. In this case,amdgpu_ib_free(ring->adev, ...)will be called, which would crash the machine because the ring value is bogus.
Quoted 6 lines
To fix this, pass a NULL pointer to
amdgpu_ib_free(): we can do this because the device is actually not used in this function.The next commit will remove the ring argument completely.
Signed-off-by Pierre-Eric Pelloux-Prayer <[email protected]>
Please add:
With that, the series is:
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1
-3@@ -256,7 +256,6 @@ void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,void amdgpu_job_free_resources (struct amdgpu_job *job) { -struct amdgpu_ring *ring =to_amdgpu_ring (job->base.sched);struct dma_fence *f;unsigned i;@@ -269,7 +268,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job) f =NULL ;for (i =0 ; i < job->num_ibs; ++i) -amdgpu_ib_free (ring->adev, &job->ibs[i], f); +amdgpu_ib_free (NULL , &job->ibs[i], f); }static void amdgpu_job_free_cb (struct drm_sched_job *s_job) --2.43.0
Christian König
maintainerAm 11.12.24 um 18:10 schrieb Pierre-Eric Pelloux-Prayer:
Quoted 10 lines
Since
2320c9e6a768("drm/sched:memset()'job' indrm_sched_job_init()") accessingjob->base.schedcan produce unexpected results as the initialisation of (*job)->base.sched done inamdgpu_job_allocis overwritten by the memset.This commit fixes an issue when a CS would fail validation and would be rejected after
job->num_ibsis incremented. In this case,amdgpu_ib_free(ring->adev, ...)will be called, which would crash the machine because the ring value is bogus.
Quoted 6 lines
To fix this, pass a NULL pointer to
amdgpu_ib_free(): we can do this because the device is actually not used in this function.The next commit will remove the ring argument completely.
Signed-off-by Pierre-Eric Pelloux-Prayer <[email protected]>
I would squash patch #1 and #2 together, but that isn't a must have.
We should look out for potential issues with patch #3, but I still hope that we cleaned up all users of this pointer.
Series is Reviewed-by: Christian König <[email protected]>
Regards,
Christian.
Quoted 25 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1
-2@@ -256,7 +256,6 @@ void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,void amdgpu_job_free_resources (struct amdgpu_job *job) { -struct amdgpu_ring *ring =to_amdgpu_ring (job->base.sched);struct dma_fence *f;unsigned i;@@ -269,7 +268,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job) f =NULL ;for (i =0 ; i < job->num_ibs; ++i) -amdgpu_ib_free (ring->adev, &job->ibs[i], f); +amdgpu_ib_free (NULL , &job->ibs[i], f); }static void amdgpu_job_free_cb (struct drm_sched_job *s_job)