summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kernel/ftrace_dyn.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/kernel/ftrace_dyn.c')
-rw-r--r--arch/loongarch/kernel/ftrace_dyn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/loongarch/kernel/ftrace_dyn.c b/arch/loongarch/kernel/ftrace_dyn.c
index 73858c9029..bff0583170 100644
--- a/arch/loongarch/kernel/ftrace_dyn.c
+++ b/arch/loongarch/kernel/ftrace_dyn.c
@@ -287,6 +287,9 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
struct kprobe *p;
struct kprobe_ctlblk *kcb;
+ if (unlikely(kprobe_ftrace_disabled))
+ return;
+
bit = ftrace_test_recursion_trylock(ip, parent_ip);
if (bit < 0)
return;