diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2018-11-01 23:29:28 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-11-05 09:47:14 -0500 |
commit | ee474b81fe5aa5dc0faae920bf66240fbf55f891 (patch) | |
tree | 1217774096cd611025ba6c940744b715556e0d92 /kernel/trace | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) | |
download | blackbird-obmc-linux-ee474b81fe5aa5dc0faae920bf66240fbf55f891.tar.gz blackbird-obmc-linux-ee474b81fe5aa5dc0faae920bf66240fbf55f891.zip |
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: a6682814f371 ("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>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 3ef15a6683c0..bd30e9398d2a 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -535,7 +535,7 @@ int traceprobe_update_arg(struct probe_arg *arg) if (code[1].op != FETCH_OP_IMM) return -EINVAL; - tmp = strpbrk("+-", code->data); + tmp = strpbrk(code->data, "+-"); if (tmp) c = *tmp; ret = traceprobe_split_symbol_offset(code->data, |