summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/probes
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/kernel/probes')
-rw-r--r--arch/riscv/kernel/probes/ftrace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/kernel/probes/ftrace.c b/arch/riscv/kernel/probes/ftrace.c
index 7142ec42e8..a69dfa610a 100644
--- a/arch/riscv/kernel/probes/ftrace.c
+++ b/arch/riscv/kernel/probes/ftrace.c
@@ -11,6 +11,9 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
struct kprobe_ctlblk *kcb;
int bit;
+ if (unlikely(kprobe_ftrace_disabled))
+ return;
+
bit = ftrace_test_recursion_trylock(ip, parent_ip);
if (bit < 0)
return;