]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Do not create directories if lockdown is in affect
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 2 Dec 2019 21:25:27 +0000 (16:25 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 4 Dec 2019 13:27:15 +0000 (08:27 -0500)
commitb02fc279a9aa12890d11c569f1d1e148db2aaa7f
tree0c75ed9a38010863a406fd53481ea986cec5c65f
parentc7014ba8d91b2da231910f450318ced670ce1817
tracing: Do not create directories if lockdown is in affect

If lockdown is disabling tracing on boot up, it prevents the tracing files
from even bering created. But when that happens, there's several places that
will give a warning that the files were not created as that is usually a
sign of a bug.

Add in strategic locations where a check is made to see if tracing is
disabled by lockdown, and if it is, do not go further, and fail silently
(but print that tracing is disabled by lockdown, without doing a WARN_ON()).

Cc: Matthew Garrett <mjg59@google.com>
Fixes: 00a97ba95cdc ("tracing: Add locked_down checks to the open calls of files created for tracefs")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c
kernel/trace/trace.c