Skip to content
/ linux Public

Commit ee93c91

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 d89b8b1 commit ee93c91

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
@@ -8858,7 +8858,7 @@ tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
88588858
trace_create_cpu_file("stats", TRACE_MODE_READ, d_cpu,
88598859
tr, cpu, &tracing_stats_fops);
88608860

8861-
trace_create_cpu_file("buffer_size_kb", TRACE_MODE_READ, d_cpu,
8861+
trace_create_cpu_file("buffer_size_kb", TRACE_MODE_WRITE, d_cpu,
88628862
tr, cpu, &tracing_entries_fops);
88638863

88648864
#ifdef CONFIG_TRACER_SNAPSHOT

0 commit comments

Comments
 (0)