]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
MIPS/kprobes: Don't call the ->break_handler() in MIPS kprobes code
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 19 Jun 2018 16:13:49 +0000 (01:13 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 21 Jun 2018 10:33:16 +0000 (12:33 +0200)
Don't call the ->break_handler() from the MIPS kprobes code,
because it was only used by jprobes which got removed.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-arch@vger.kernel.org
Cc: linux-mips@linux-mips.org
Link: https://lore.kernel.org/lkml/152942482953.15209.843924518200700137.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/mips/kernel/kprobes.c

index efdcd0b1ce127ccce61af5ba26deb9d8980e6e83..7fd277bc59b944d6f327ae7544193d342dff8f5a 100644 (file)
@@ -326,19 +326,13 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                                preempt_enable_no_resched();
                        }
                        return 1;
-               } else {
-                       if (addr->word != breakpoint_insn.word) {
-                               /*
-                                * The breakpoint instruction was removed by
-                                * another cpu right after we hit, no further
-                                * handling of this interrupt is appropriate
-                                */
-                               ret = 1;
-                               goto no_kprobe;
-                       }
-                       p = __this_cpu_read(current_kprobe);
-                       if (p->break_handler && p->break_handler(p, regs))
-                               goto ss_probe;
+               } else if (addr->word != breakpoint_insn.word) {
+                       /*
+                        * The breakpoint instruction was removed by
+                        * another cpu right after we hit, no further
+                        * handling of this interrupt is appropriate
+                        */
+                       ret = 1;
                }
                goto no_kprobe;
        }
@@ -367,7 +361,6 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                return 1;
        }
 
-ss_probe:
        prepare_singlestep(p, regs, kcb);
        if (kcb->flags & SKIP_DELAYSLOT) {
                kcb->kprobe_status = KPROBE_HIT_SSDONE;