diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-11-14 11:42:06 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-19 15:25:48 -0500 |
commit | 8e2e095cbecad21078332cd83ae7e61ecfe12c59 (patch) | |
tree | 2e90e347e207d85ec483c7aef8355ab89424843b /kernel/trace | |
parent | dba39448abb7340f86ae9b062f99d7acacb5d2d2 (diff) | |
download | linux-stable-8e2e095cbecad21078332cd83ae7e61ecfe12c59.tar.gz linux-stable-8e2e095cbecad21078332cd83ae7e61ecfe12c59.tar.bz2 linux-stable-8e2e095cbecad21078332cd83ae7e61ecfe12c59.zip |
tracing: Fix return value of ftrace_raw_output_prep()
If the trace_seq of ftrace_raw_output_prep() is full this function
returns TRACE_TYPE_PARTIAL_LINE, otherwise it returns zero.
The problem is that TRACE_TYPE_PARTIAL_LINE happens to be zero!
The thing is, the caller of ftrace_raw_output_prep() expects a
success to be zero. Change that to expect it to be
TRACE_TYPE_HANDLED.
Link: http://lkml.kernel.org/r/20141114112522.GA2988@dhcp128.suse.cz
Reminded-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_output.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 163c11b6b8ff..723818bc83b4 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -196,10 +196,7 @@ int ftrace_raw_output_prep(struct trace_iterator *iter, trace_seq_init(p); trace_seq_printf(s, "%s: ", ftrace_event_name(event)); - if (trace_seq_has_overflowed(s)) - return TRACE_TYPE_PARTIAL_LINE; - - return 0; + return trace_handle_return(s); } EXPORT_SYMBOL(ftrace_raw_output_prep); |