]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Don't display trigger file for events that can't be enabled
authorChunyu Hu <chuhu@redhat.com>
Tue, 3 May 2016 11:34:34 +0000 (19:34 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 3 May 2016 16:59:30 +0000 (12:59 -0400)
commit1425012278b7d80ccf3179e81bec554979466aa9
tree4a66a8bc548b7a5bf8ae0e8890a09cd589af9ab8
parent92c210dea15db4dd0ee386a76eaf2970675f69b5
tracing: Don't display trigger file for events that can't be enabled

Currently register functions for events will be called
through the 'reg' field of event class directly without
any check when seting up triggers.

Triggers for events that don't support register through
debug fs (events under events/ftrace are for trace-cmd to
read event format, and most of them don't have a register
function except events/ftrace/functionx) can't be enabled
at all, and an oops will be hit when setting up trigger
for those events, so just not creating them is an easy way
to avoid the oops.

Link: http://lkml.kernel.org/r/1462275274-3911-1-git-send-email-chuhu@redhat.com
Cc: stable@vger.kernel.org # 3.14+
Fixes: 2fcfbe66f6232 ("tracing: Add basic event trigger framework")
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c