Skip to content

Commit

Permalink
tracing: Fix synthetic print fmt check for use of __get_str()
Browse files Browse the repository at this point in the history
A cut and paste error had the check to use __get_str() test "is_dynamic"
twice, instead of checking "is_string && is_dynamic".

Link: https://lore.kernel.org/r/d34dccd5-96ba-a2d9-46ea-de8807525deb@canonical.com

Reported-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (VMware) committed Oct 8, 2020
1 parent 43aa422 commit 8481835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static int __set_synth_event_print_fmt(struct synth_event *event,
pos += snprintf(buf + pos, LEN_OR_ZERO, "\"");

for (i = 0; i < event->n_fields; i++) {
if (event->fields[i]->is_dynamic &&
if (event->fields[i]->is_string &&
event->fields[i]->is_dynamic)
pos += snprintf(buf + pos, LEN_OR_ZERO,
", __get_str(%s)", event->fields[i]->name);
Expand Down

0 comments on commit 8481835

Please sign in to comment.