Skip to contentSkip to conversation

tracing: Fix synthetic print fmt check for use of __get_str()

PATCH New Steven Rostedt 1 participant 1 message Oct 8, 2020 Tracing

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 tracing: Fix synthetic print fmt check for use of __get_str()

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: 9d8739bc05f6d0f3ad21dc5d56f1edfbb9aa7585

Steven Rostedt (VMware) (1):
tracing: Fix synthetic print fmt check for use of __get_str()

----

 kernel/trace/trace_events_synth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 9d8739bc05f6d0f3ad21dc5d56f1edfbb9aa7585
Author: Steven Rostedt (VMware) <[email protected]>
Date:   Wed Oct 7 10:34:34 2020 -0400

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".

kernel/trace/trace_events_synth.c +1 -1
index 742ce5f62d6d..3b2dcc42b8ee 100644
@@ -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);