summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagar Kamble <skamble@nvidia.com>2020-07-09 07:28:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2020-08-15 00:39:20 -0400
commit1bb8314ca7e0be97a14aee56d793892a57ae2182 (patch)
treee7ac3a2e6d4c21b907918676915a3cb5e75b1e8c
parentc46d6fbc5b8d87118ed608e462c62a7976d19246 (diff)
gpu: nvgpu: remove cap checks from fifo_sched & ctxsw_ring debugfs open
Debugfs can be mounted with root-only permissions hence remove the extra cap checks in the debugfs open calls for fifo_sched & ctxsw_ring. Bug 2823941 Change-Id: I41668a887635f34897886b872ad435b183b85959 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2372982 (cherry picked from commit f34037a09f5996762c69bb4ce86751ed7df24ee7) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2392713 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_fecs_trace.c5
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_fifo.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.c b/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.c
index 9e72d2ce..7786053f 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.c
+++ b/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -99,9 +99,6 @@ static int gk20a_ctxsw_debugfs_ring_open(struct inode *inode,
99{ 99{
100 struct gk20a **p; 100 struct gk20a **p;
101 101
102 if (!capable(CAP_SYS_ADMIN))
103 return -EPERM;
104
105 p = __seq_open_private(file, &gk20a_fecs_trace_debugfs_ring_seq_ops, 102 p = __seq_open_private(file, &gk20a_fecs_trace_debugfs_ring_seq_ops,
106 sizeof(struct gk20a *)); 103 sizeof(struct gk20a *));
107 if (!p) 104 if (!p)
diff --git a/drivers/gpu/nvgpu/os/linux/debug_fifo.c b/drivers/gpu/nvgpu/os/linux/debug_fifo.c
index 0c791a42..98da8bc7 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_fifo.c
+++ b/drivers/gpu/nvgpu/os/linux/debug_fifo.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2017-2018 NVIDIA Corporation. All rights reserved. 2 * Copyright (C) 2017-2020 NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This software is licensed under the terms of the GNU General Public 4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 5 * License version 2, as published by the Free Software Foundation, and
@@ -113,9 +113,6 @@ static int gk20a_fifo_sched_debugfs_open(struct inode *inode,
113 struct gk20a *g = inode->i_private; 113 struct gk20a *g = inode->i_private;
114 int err; 114 int err;
115 115
116 if (!capable(CAP_SYS_ADMIN))
117 return -EPERM;
118
119 err = seq_open(file, &gk20a_fifo_sched_debugfs_seq_ops); 116 err = seq_open(file, &gk20a_fifo_sched_debugfs_seq_ops);
120 if (err) 117 if (err)
121 return err; 118 return err;