Skip to content

Commit

Permalink
tracing: Fix trace_seq_bitmask() to start at current position
Browse files Browse the repository at this point in the history
In trace_seq_bitmask() it calls bitmap_scnprintf() not from the current
position of the trace_seq buffer (s->buffer + s->len), but instead from
the beginning of the buffer (s->buffer).

Luckily, the only user of this "ipi_raise tracepoint" uses it as the
first parameter, and as such, the start of the temp buffer in
include/trace/ftrace.h (see __get_bitmask()).

Reported-by: Petr Mladek <pmladek@suse.cz>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (Red Hat) committed Nov 19, 2014
1 parent dbcf3e0 commit e400a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
if (s->full || !len)
return 0;

ret = bitmap_scnprintf(s->buffer, len, maskp, nmaskbits);
ret = bitmap_scnprintf(s->buffer + s->len, len, maskp, nmaskbits);
s->len += ret;

return 1;
Expand Down

0 comments on commit e400a40

Please sign in to comment.