mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
fprobe: Skip exit_handler if entry_handler returns !0
Skip hooking function return and calling exit_handler if the entry_handler() returns !0. Link: https://lkml.kernel.org/r/167526699798.433354.10998365726830117303.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest <revest@chromium.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
7e7ef1bfe5
commit
39d954200b
@@ -48,8 +48,8 @@ static void show_backtrace(void)
|
||||
stack_trace_print(stacks, len, 24);
|
||||
}
|
||||
|
||||
static void sample_entry_handler(struct fprobe *fp, unsigned long ip,
|
||||
struct pt_regs *regs, void *data)
|
||||
static int sample_entry_handler(struct fprobe *fp, unsigned long ip,
|
||||
struct pt_regs *regs, void *data)
|
||||
{
|
||||
if (use_trace)
|
||||
/*
|
||||
@@ -62,6 +62,7 @@ static void sample_entry_handler(struct fprobe *fp, unsigned long ip,
|
||||
nhit++;
|
||||
if (stackdump)
|
||||
show_backtrace();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sample_exit_handler(struct fprobe *fp, unsigned long ip, struct pt_regs *regs,
|
||||
|
Reference in New Issue
Block a user