Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Fix to set write permission to per-cpu buffer_size_kb

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: 21ccc9cd7211 ("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>

authored by

Masami Hiramatsu (Google) and committed by
Steven Rostedt (Google)
f844282d f743435f

+1 -1
+1 -1
kernel/trace/trace.c
··· 8613 8613 trace_create_cpu_file("stats", TRACE_MODE_READ, d_cpu, 8614 8614 tr, cpu, &tracing_stats_fops); 8615 8615 8616 - trace_create_cpu_file("buffer_size_kb", TRACE_MODE_READ, d_cpu, 8616 + trace_create_cpu_file("buffer_size_kb", TRACE_MODE_WRITE, d_cpu, 8617 8617 tr, cpu, &tracing_entries_fops); 8618 8618 8619 8619 if (tr->range_addr_start)