[RFC PATCH -tip 9/9] tracing: kprobes: Fix to not enabling preemption
From: Masami Hiramatsu
Date: Fri Mar 09 2018 - 07:40:13 EST
Since kprobes pre_handler doesn't need to recover preemption
even if it modifies regs->ip anymore, this fixes to remove
the preempt_enable_no_resched() from pre_handler.
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
kernel/trace/trace_kprobe.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 5ce9b8cf7be3..6c894e2be8d6 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1221,12 +1221,9 @@ kprobe_perf_func(struct trace_kprobe *tk, struct pt_regs *regs)
* We need to check and see if we modified the pc of the
* pt_regs, and if so clear the kprobe and return 1 so that we
* don't do the single stepping.
- * The ftrace kprobe handler leaves it up to us to re-enable
- * preemption here before returning if we've modified the ip.
*/
if (orig_ip != instruction_pointer(regs)) {
reset_current_kprobe();
- preempt_enable_no_resched();
return 1;
}
if (!ret)