]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix permissions for the buffer_percent file
authorOndrej Mosnacek <omosnace@redhat.com>
Wed, 3 May 2023 14:01:14 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:04 +0000 (23:03 +0900)
commit1f70921d702eaf1319a23739b5d46bf3c0274b31
tree317d685daa5ec51c60079f8473f85c4fcecea1d5
parenta53b1e76c5dcccfa712a7eaf49958156a21b9254
tracing: Fix permissions for the buffer_percent file

commit 4f94559f40ad06d627c0fdfc3319cec778a2845b upstream.

This file defines both read and write operations, yet it is being
created as read-only. This means that it can't be written to without the
CAP_DAC_OVERRIDE capability. Fix the permissions to allow root to write
to it without the need to override DAC perms.

Link: https://lore.kernel.org/linux-trace-kernel/20230503140114.3280002-1-omosnace@redhat.com
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: df25b5075106 ("tracing: Add tracefs file buffer_percentage")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c