]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/sched: NULL out the s_fence field after run_job
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 28 Sep 2017 09:51:32 +0000 (11:51 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Oct 2017 21:44:30 +0000 (17:44 -0400)
commite5a5cb466bc5e089423ed2d53cd18cb81551b9d2
tree3e6973a35e3b9ee5c92d76331895010080abaf8e
parente8aaf0b37ed22d65d56449a021089305bae419ef
drm/amd/sched: NULL out the s_fence field after run_job

amd_sched_process_job drops the fence reference, so NULL out the s_fence
field before adding it as a callback to guard against accidentally using
s_fence after it may have be freed.

v2: add a clarifying comment

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c