diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-01-17 01:00:12 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-17 13:44:20 -0500 |
commit | 72f27f77472503ccaa840c1fc01efbf5df6075d0 (patch) | |
tree | 8f3bca57d94d383da6200fdf9c22d11e5ea5df1f /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |
parent | 4942cc4222ef2049f5596b87ae9007123cdcdedb (diff) |
gpu: nvgpu: serialize debug session IOCTLs
Hold debug_s->ioctl_lock for all debug session
IOCTLs to prevent multi-threaded user space
IOCTL calls
debug session IOCTL calls are not thread-safe
and hence this serialization is required
Bug 1832267
Change-Id: I847ac951601d4f0093546b592bdb8c8f00185317
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1286436
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index 600715f5..773a669c 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Tegra GK20A GPU Debugger Driver | 2 | * Tegra GK20A GPU Debugger Driver |
3 | * | 3 | * |
4 | * Copyright (c) 2013-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -73,6 +73,8 @@ struct dbg_session_gk20a { | |||
73 | struct dbg_gpu_session_events dbg_events; | 73 | struct dbg_gpu_session_events dbg_events; |
74 | 74 | ||
75 | bool broadcast_stop_trigger; | 75 | bool broadcast_stop_trigger; |
76 | |||
77 | struct mutex ioctl_lock; | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | struct dbg_session_data { | 80 | struct dbg_session_data { |