]> rtime.felk.cvut.cz Git - linux-imx.git/commit
tracing: Change f_start() to take event_mutex and verify i_private != NULL
authorOleg Nesterov <oleg@redhat.com>
Fri, 26 Jul 2013 17:25:43 +0000 (19:25 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 30 Jul 2013 02:57:10 +0000 (22:57 -0400)
commitc5a44a1200c6eda2202434f25325e8ad19533fca
tree4ac8699d7e7ce648d888a2f2fb4889380d9b02a6
parente2912b091c26b8ea95e5e00a43a7ac620f6c94a6
tracing: Change f_start() to take event_mutex and verify i_private != NULL

trace_format_open() and trace_format_seq_ops are racy, nothing
protects ftrace_event_call from trace_remove_event_call().

Change f_start() to take event_mutex and verify i_private != NULL,
change f_stop() to drop this lock.

This fixes nothing, but now we can change debugfs_remove("format")
callers to nullify ->i_private and fix the the problem.

Note: the usage of event_mutex is sub-optimal but simple, we can
change this later.

Link: http://lkml.kernel.org/r/20130726172543.GA3622@redhat.com
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c