diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2017-10-23 18:37:39 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-12 13:51:41 +0100 |
commit | f72180cc93a2c64d4efe0129fa2396ad78be80e3 (patch) | |
tree | 5bcb7d2e763cbd45bcedf15f99bf44ecdf0e1a7d /arch/powerpc/kernel/optprobes.c | |
parent | powerpc/kprobes: Disable preemption before invoking probe handler for optprobes (diff) | |
download | linux-f72180cc93a2c64d4efe0129fa2396ad78be80e3.tar.xz linux-f72180cc93a2c64d4efe0129fa2396ad78be80e3.zip |
powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace
Per Documentation/kprobes.txt, we don't necessarily need to disable
interrupts before invoking the kprobe handlers. Masami submitted
similar changes for x86 via commit a19b2e3d783964 ("kprobes/x86: Remove
IRQ disabling from ftrace-based/optimized kprobes"). Do the same for
powerpc.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/optprobes.c')
-rw-r--r-- | arch/powerpc/kernel/optprobes.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c index 60ba7f1370a8..8237884ca389 100644 --- a/arch/powerpc/kernel/optprobes.c +++ b/arch/powerpc/kernel/optprobes.c @@ -115,14 +115,10 @@ static unsigned long can_optimize(struct kprobe *p) static void optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs) { - unsigned long flags; - /* This is possible if op is under delayed unoptimizing */ if (kprobe_disabled(&op->kp)) return; - local_irq_save(flags); - hard_irq_disable(); preempt_disable(); if (kprobe_running()) { @@ -135,13 +131,7 @@ static void optimized_callback(struct optimized_kprobe *op, __this_cpu_write(current_kprobe, NULL); } - /* - * No need for an explicit __hard_irq_enable() here. - * local_irq_restore() will re-enable interrupts, - * if they were hard disabled. - */ preempt_enable_no_resched(); - local_irq_restore(flags); } NOKPROBE_SYMBOL(optimized_callback); |