From 02ab4c388010001d5bf94c206a28ee75c0d192f2 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 22 Nov 2021 16:38:48 +0000 Subject: [PATCH] gpu: nvgpu: Correct permissions for cbc_ctrl debug node The cbc_ctrl debugfs node is created with both read and write permissions, however, this node only supports being written and not read. Fix this by removing read permissions for this debugfs node. Bug 3402817 Change-Id: I16ffba8285144389758be283121c3096745aae73 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2630027 Tested-by: mobile promotions Reviewed-by: Martin Radev Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/os/linux/debug_gr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/debug_gr.c b/drivers/gpu/nvgpu/os/linux/debug_gr.c index 74b7015e1..7830e4cb5 100644 --- a/drivers/gpu/nvgpu/os/linux/debug_gr.c +++ b/drivers/gpu/nvgpu/os/linux/debug_gr.c @@ -477,7 +477,7 @@ int gr_gk20a_debugfs_init(struct gk20a *g) if (!d) return -ENOMEM; /* Using debugfs_create_file_unsafe to allow mmap */ - d = debugfs_create_file_unsafe("cbc_ctrl", S_IRUSR | S_IWUSR, + d = debugfs_create_file_unsafe("cbc_ctrl", S_IWUSR, l->debugfs, g, &cbc_ctrl_debug_fops); if (!d) return -ENOMEM;