提交 ee474b81 编写于 作者: M Masami Hiramatsu 提交者: Steven Rostedt (VMware)

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: a6682814 ("tracing/kprobes: Allow kprobe-events to record module symbol")
Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 65102238
...@@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg) ...@@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg)
if (code[1].op != FETCH_OP_IMM) if (code[1].op != FETCH_OP_IMM)
return -EINVAL; return -EINVAL;
tmp = strpbrk("+-", code->data); tmp = strpbrk(code->data, "+-");
if (tmp) if (tmp)
c = *tmp; c = *tmp;
ret = traceprobe_split_symbol_offset(code->data, ret = traceprobe_split_symbol_offset(code->data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册