Skip to content

Commit

Permalink
tracing: probeevent: Fix uninitialized used of offset in parse args
Browse files Browse the repository at this point in the history
Dan's smatch utility found an uninitialized use of offset in a path in
parse_probe_args(). Unless an offset is specifically specified for commands
that allow them, it should default to zero.

Link: http://lkml.kernel.org/r/20181012134246.5doqaobxunlqqs53@mwanda
Fixes: 5330592 ("tracing: probeevent: Introduce new argument fetching code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> (smatch)
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (VMware) committed Oct 12, 2018
1 parent a668281 commit bf173ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ parse_probe_arg(char *arg, const struct fetch_type *type,
{
struct fetch_insn *code = *pcode;
unsigned long param;
long offset;
long offset = 0;
char *tmp;
int ret = 0;

Expand Down

0 comments on commit bf173ca

Please sign in to comment.