From f4be6c43734c29f2be022d43504fb2308b8dbac1 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 15 Sep 2016 19:41:34 -0700 Subject: gpu: nvgpu: Cancel timeout handler before job cleanup Cancel timeout handler before cleaning up the list of jobs. This prevents a race that makes timeout handler access already freed jobs. Bug 1814108 Change-Id: I37cfc408cb1f96b8b0e62db1ca8067a2ae43dd0e Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1221698 (cherry picked from commit be0d146cba8dc2b1bdb7c53ae39188a4bf0ca019) Reviewed-on: http://git-master/r/1223843 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 5dac72e5..92b43c8a 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1903,6 +1903,7 @@ static void gk20a_channel_clean_up_jobs(struct work_struct *work) platform = gk20a_get_platform(g->dev); gk20a_channel_cancel_job_clean_up(c, false); + gk20a_channel_timeout_stop(c); while (1) { bool completed; -- cgit v1.2.2