From: Masami Hiramatsu Date: Thu, 1 Nov 2018 14:29:28 +0000 (+0900) Subject: tracing/kprobes: Fix strpbrk() argument order X-Git-Tag: v5.15~7623^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee474b81fe5aa5dc0faae920bf66240fbf55f891;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Steven Rostedt (VMware) --- diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 3ef15a6..bd30e93 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,