Skip to content
/ linux Public

Commit 0f4dcba

Browse files
mhiramatSasha Levin
authored andcommitted
tracing: Fix to set write permission to per-cpu buffer_size_kb
[ Upstream commit f844282 ] Since the per-cpu buffer_size_kb file is writable for changing per-cpu ring buffer size, the file should have the write access permission. Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/177071301597.2293046.11683339475076917920.stgit@mhiramat.tok.corp.google.com Fixes: 21ccc9c ("tracing: Disable "other" permission bits in the tracefs files") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ec4445a commit 0f4dcba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8831,7 +8831,7 @@ tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
88318831
trace_create_cpu_file("stats", TRACE_MODE_READ, d_cpu,
88328832
tr, cpu, &tracing_stats_fops);
88338833

8834-
trace_create_cpu_file("buffer_size_kb", TRACE_MODE_READ, d_cpu,
8834+
trace_create_cpu_file("buffer_size_kb", TRACE_MODE_WRITE, d_cpu,
88358835
tr, cpu, &tracing_entries_fops);
88368836

88378837
#ifdef CONFIG_TRACER_SNAPSHOT

0 commit comments

Comments
 (0)