Skip to content

Commit e400a40

Browse files
committed
tracing: Fix trace_seq_bitmask() to start at current position
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>
1 parent dbcf3e0 commit e400a40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/trace_seq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
122122
if (s->full || !len)
123123
return 0;
124124

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

128128
return 1;

0 commit comments

Comments
 (0)