提交 d0e02579 编写于 作者: S Steven Rostedt (VMware) 提交者: Arnaldo Carvalho de Melo

trace/kprobes: Add back warning about offset in return probes

Let's not remove the warning about offsets and return probes when the
offset is invalid.
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
Acked-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20170227115204.00f92846@gandalf.local.homeSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 f1c4d1ad
......@@ -695,6 +695,11 @@ static int create_trace_kprobe(int argc, char **argv)
pr_info("Failed to parse symbol.\n");
return ret;
}
if (offset && is_return &&
!arch_function_offset_within_entry(offset)) {
pr_info("Given offset is not valid for return probe.\n");
return -EINVAL;
}
}
argc -= 2; argv += 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册