aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/kprobes.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r--arch/powerpc/kernel/kprobes.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 27b0c40601fb..cfab48566db1 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -179,6 +179,18 @@ static inline int kprobe_handler(struct pt_regs *regs)
179 kcb->kprobe_status = KPROBE_REENTER; 179 kcb->kprobe_status = KPROBE_REENTER;
180 return 1; 180 return 1;
181 } else { 181 } else {
182 if (*addr != BREAKPOINT_INSTRUCTION) {
183 /* If trap variant, then it belongs not to us */
184 kprobe_opcode_t cur_insn = *addr;
185 if (is_trap(cur_insn))
186 goto no_kprobe;
187 /* The breakpoint instruction was removed by
188 * another cpu right after we hit, no further
189 * handling of this interrupt is appropriate
190 */
191 ret = 1;
192 goto no_kprobe;
193 }
182 p = __get_cpu_var(current_kprobe); 194 p = __get_cpu_var(current_kprobe);
183 if (p->break_handler && p->break_handler(p, regs)) { 195 if (p->break_handler && p->break_handler(p, regs)) {
184 goto ss_probe; 196 goto ss_probe;