Repository navigation
Commit b86d0ba
tracing: Change f_start() to take event_mutex and verify i_private != NULL
commit c5a44a1 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 70c91fb commit b86d0ba
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
| 841 | + | |
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
885 | 890 | | |
886 | 891 | | |
887 | 892 | | |
| |||
896 | 901 | | |
897 | 902 | | |
898 | 903 | | |
899 | | - | |
| 904 | + | |
900 | 905 | | |
901 | 906 | | |
902 | 907 | | |
| |||
947 | 952 | | |
948 | 953 | | |
949 | 954 | | |
| 955 | + | |
950 | 956 | | |
951 | 957 | | |
952 | 958 | | |
| |||
958 | 964 | | |
959 | 965 | | |
960 | 966 | | |
961 | | - | |
962 | 967 | | |
963 | 968 | | |
964 | 969 | | |
| |||
967 | 972 | | |
968 | 973 | | |
969 | 974 | | |
970 | | - | |
| 975 | + | |
971 | 976 | | |
972 | 977 | | |
973 | 978 | | |
| |||
0 commit comments