Skip to content
Commit 9971c3f9 authored by Steven Rostedt (Google)'s avatar Steven Rostedt (Google)
Browse files

tracing: Fix trace_event_raw_event_synth() if else statement

The test to check if the field is a stack is to be done if it is not a
string. But the code had:

    } if (event->fields[i]->is_stack) {

and not

   } else if (event->fields[i]->is_stack) {

which would cause it to always be tested. Worse yet, this also included an
"else" statement that was only to be called if the field was not a string
and a stack, but this code allows it to be called if it was a string (and
not a stack).

Also fixed some whitespace issues.

Link: https://lore.kernel.org/all/202301302110.mEtNwkBD-lkp@intel.com/
Link: https://lore.kernel.org/linux-trace-kernel/20230131095237.63e3ca8d@gandalf.local.home



Cc: Tom Zanussi <zanussi@kernel.org>
Fixes: 00cf3d67 ("tracing: Allow synthetic events to pass around stacktraces")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent aef70ebd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment