Skip to content

Commit

Permalink
tracing: Initialize val to zero in parse_entry of inject code
Browse files Browse the repository at this point in the history
gcc produces a variable may be uninitialized warning for "val" in
parse_entry(). This is really a false positive, but the code is subtle
enough to just initialize val to zero and it's not a fast path to worry
about it.

Marked for stable to remove the warning in the stable trees as well.

Cc: stable@vger.kernel.org
Fixes: 6c3edaf ("tracing: Introduce trace event injection")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (VMware) committed Jan 3, 2020
1 parent fe6e096 commit 02f4e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events_inject.c
Original file line number Diff line number Diff line change
@@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry)
unsigned long irq_flags;
void *entry = NULL;
int entry_size;
u64 val;
u64 val = 0;
int len;

entry = trace_alloc_entry(call, &entry_size);

0 comments on commit 02f4e01

Please sign in to comment.