aboutsummaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt (VMware)2020-10-07 10:34:34 -0400
committerSteven Rostedt (VMware)2020-10-08 15:29:07 -0400
commit848183553e431e6e9c2ea2f72421a7a1bbc6532e (patch)
tree6e877bb2190b21a61ce1d206487c10d50c76c420 /kernel/trace
parent43aa422c0c07135236bd91cbb45b048fd85e73b5 (diff)
tracing: Fix synthetic print fmt check for use of __get_str()
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>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_synth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c
index 742ce5f62d6d..3b2dcc42b8ee 100644
--- a/kernel/trace/trace_events_synth.c
+++ b/kernel/trace/trace_events_synth.c
@@ -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);