summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-11-07 18:47:46 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-19 18:40:19 -0500
commit9da40c79fc36ea73cf682a7f4c76c8717bcf4fce (patch)
tree4f076752db90e61df5923a7a1c608762894cff4a /drivers/gpu/nvgpu/gk20a/gk20a.h
parent1d8a77a7f9c7192db8562ecd303fe47c30bde3fd (diff)
gpu: nvgpu: Store pending sema waits
Store pending sema waits so that they can be explicitly handled when the driver dies. If the sema_wait is freed before the pending wait is either handled or canceled problems occur. Internally the sync_fence_wait_async() function uses the kernel timers. That uses a linked list of possible events. That means every so often the kernel iterates through this list. If the list node that is in the sync_fence_waiter struct is freed before it can be removed from the pending timers list then the kernel timers list can be corrupted. When the kernel then iterates through this list crashes and other related problems can happen. Bug 1816516 Bug 1807277 Change-Id: Iddc4be64583c19bfdd2d88b9098aafc6ae5c6475 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1250025 (cherry picked from commit 01889e21bd31dbd7ee85313e98079138ed1d63be) Reviewed-on: http://git-master/r/1261920 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index a4cbb4b2..987dd517 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -874,6 +874,10 @@ struct gk20a {
874 */ 874 */
875 struct gk20a_semaphore_sea *sema_sea; 875 struct gk20a_semaphore_sea *sema_sea;
876 876
877 /* List of pending SW semaphore waits. */
878 struct list_head pending_sema_waits;
879 raw_spinlock_t pending_sema_waits_lock;
880
877 /* held while manipulating # of debug/profiler sessions present */ 881 /* held while manipulating # of debug/profiler sessions present */
878 /* also prevents debug sessions from attaching until released */ 882 /* also prevents debug sessions from attaching until released */
879 struct mutex dbg_sessions_lock; 883 struct mutex dbg_sessions_lock;