]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: kprobes/ftrace: Add recursion protection to the ftrace callback
authorJisheng Zhang <jszhang@kernel.org>
Mon, 29 Mar 2021 18:14:40 +0000 (02:14 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 16 Apr 2021 04:32:34 +0000 (21:32 -0700)
commitc4d28c547afd2eb16b747f23330b15dc698cfdcd
treeddaad7d4e24b5d2ff2f63069e0be6482a5d0af14
parent5b7a92b820cd2b00188c91980163aca2226f514f
riscv: kprobes/ftrace: Add recursion protection to the ftrace callback

Currently, the riscv's kprobes(powerred by ftrace) handler is
preemptible. Futher check indicates we miss something similar as the
commit 46ab080fa3a2 ("kprobes/ftrace: Add recursion protection to the
ftrace callback"), so do similar modifications as the commit does.

Fixes: 3c427a1a6ddc ("riscv: Add KPROBES_ON_FTRACE supported")
Cc: stable@vger.kernel.org
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/probes/ftrace.c