Skip to content

Commit bf173ca

Browse files
committed
tracing: probeevent: Fix uninitialized used of offset in parse args
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>
1 parent a668281 commit bf173ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/trace/trace_probe.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ parse_probe_arg(char *arg, const struct fetch_type *type,
209209
{
210210
struct fetch_insn *code = *pcode;
211211
unsigned long param;
212-
long offset;
212+
long offset = 0;
213213
char *tmp;
214214
int ret = 0;
215215

0 commit comments

Comments
 (0)