]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Avoid accessing job->entity after the job is scheduled.
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Thu, 19 Oct 2017 18:29:46 +0000 (14:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:33:08 +0000 (16:33 -0500)
commit780082045d7c7d68827a7b24c9050b80dcc80000
treed596b7bcfbac180a1d478dd3bebba45dc56ea404
parent062f993f94b3323af760a8754a7030948116d1f6
drm/amdgpu: Avoid accessing job->entity after the job is scheduled.

Bug: amdgpu_job_free_cb was accessing s_job->s_entity when the allocated
amdgpu_ctx (and the entity inside it) were already deallocated from
amdgpu_cs_parser_fini.

Fix: Save job's priority on it's creation instead of accessing it from
s_entity later on.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.h