From 4f3647ca32650ff93da1c1159bc87561e89489fa Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 18 Dec 2014 10:57:02 +0200 Subject: gpu: nvgpu: protect channel abort with submit lock Bug 200065789 Change-Id: I59eb93c7929a77cd4de4be40fd7902cd05e536c7 Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/665655 (cherry-picked from commit 4ee1893926557b01d7058a0a4c1c23e4476d7668) Reviewed-on: http://git-master/r/668850 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index de51e83e..28b0bbc7 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1,7 +1,7 @@ /* * GK20A Graphics channel * - * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -419,8 +419,10 @@ void gk20a_channel_abort(struct channel_gk20a *ch) bool released_job_semaphore = false; /* ensure no fences are pending */ + mutex_lock(&ch->submit_lock); if (ch->sync) ch->sync->set_min_eq_max(ch->sync); + mutex_unlock(&ch->submit_lock); /* release all job semaphores (applies only to jobs that use semaphore synchronization) */ -- cgit v1.2.2