Skip to content

Commit

Permalink
tracing/synthetic: Print out u64 values properly
Browse files Browse the repository at this point in the history
commit 62663b8 upstream.

The synth traces incorrectly print pointer to the synthetic event values
instead of the actual value when using u64 type. Fix by addressing the
contents of the union properly.

Link: https://lore.kernel.org/linux-trace-kernel/20230911141704.3585965-1-tero.kristo@linux.intel.com

Fixes: ddeea49 ("tracing/synthetic: Use union instead of casts")
Cc: stable@vger.kernel.org
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tero Kristo authored and gregkh committed Sep 23, 2023
1 parent 58ce479 commit 815e413
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events_synth.c
Expand Up @@ -337,7 +337,7 @@ static void print_synth_event_num_val(struct trace_seq *s,
break;

default:
trace_seq_printf(s, print_fmt, name, val, space);
trace_seq_printf(s, print_fmt, name, val->as_u64, space);
break;
}
}
Expand Down

0 comments on commit 815e413

Please sign in to comment.