Skip to content

Commit

Permalink
tracing: Fix clear of RECORDED_TGID flag when disabling trace event
Browse files Browse the repository at this point in the history
When disabling one trace event, the RECORDED_TGID flag in the event
file is not correctly cleared. It's clearing RECORDED_CMD flag when
it should clear RECORDED_TGID flag.

Link: http://lkml.kernel.org/r/1504589806-8425-1-git-send-email-chuhu@redhat.com

Cc: Joel Fernandes <joelaf@google.com>
Cc: stable@vger.kernel.org
Fixes: d914ba3 ("tracing: Add support for recording tgid of tasks")
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Chunyu Hu authored and Steven Rostedt (VMware) committed Sep 5, 2017
1 parent 3d9622c commit 7685ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,

if (file->flags & EVENT_FILE_FL_RECORDED_TGID) {
tracing_stop_tgid_record();
clear_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
clear_bit(EVENT_FILE_FL_RECORDED_TGID_BIT, &file->flags);
}

call->class->reg(call, TRACE_REG_UNREGISTER, file);
Expand Down

0 comments on commit 7685ab6

Please sign in to comment.