summaryrefslogtreecommitdiffstats
path: root/kernel/cpu_pm.c
diff options
context:
space:
mode:
authorTom Zanussi <zanussi@kernel.org>2020-02-14 23:56:41 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-02-20 22:24:17 +0100
commit784bd0847eda032ed2f3522f87250655a18c0190 (patch)
tree259ac748d1cc825aaf13b8eb5d2c3630f458b2f7 /kernel/cpu_pm.c
parenttracing: Check that number of vals matches number of synth event fields (diff)
downloadlinux-784bd0847eda032ed2f3522f87250655a18c0190.tar.xz
linux-784bd0847eda032ed2f3522f87250655a18c0190.zip
tracing: Fix number printing bug in print_synth_event()
Fix a varargs-related bug in print_synth_event() which resulted in strange output and oopses on 32-bit x86 systems. The problem is that trace_seq_printf() expects the varargs to match the format string, but print_synth_event() was always passing u64 values regardless. This results in unspecified behavior when unpacking with va_arg() in trace_seq_printf(). Add a function that takes the size into account when calling trace_seq_printf(). Before: modprobe-1731 [003] .... 919.039758: gen_synth_test: next_pid_field=777(null)next_comm_field=hula hoops ts_ns=1000000 ts_ms=1000 cpu=3(null)my_string_field=thneed my_int_field=598(null) After: insmod-1136 [001] .... 36.634590: gen_synth_test: next_pid_field=777 next_comm_field=hula hoops ts_ns=1000000 ts_ms=1000 cpu=1 my_string_field=thneed my_int_field=598 Link: http://lkml.kernel.org/r/a9b59eb515dbbd7d4abe53b347dccf7a8e285657.1581720155.git.zanussi@kernel.org Reported-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/cpu_pm.c')
0 files changed, 0 insertions, 0 deletions