Skip to content

Commit ee474b8

Browse files
mhiramatrostedt
authored andcommitted
tracing/kprobes: Fix strpbrk() argument order
Fix strpbrk()'s argument order, it must pass acceptable string in 2nd argument. Note that this can cause a kernel panic where it recovers backup character to code->data. Link: http://lkml.kernel.org/r/154108256792.2604.1816052586385217811.stgit@devbox Fixes: a668281 ("tracing/kprobes: Allow kprobe-events to record module symbol") Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent 6510223 commit ee474b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg)
535535
if (code[1].op != FETCH_OP_IMM)
536536
return -EINVAL;
537537

538-
tmp = strpbrk("+-", code->data);
538+
tmp = strpbrk(code->data, "+-");
539539
if (tmp)
540540
c = *tmp;
541541
ret = traceprobe_split_symbol_offset(code->data,

0 commit comments

Comments
 (0)