diff options
| -rw-r--r-- | arch/powerpc/kernel/kprobes.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index c533525ca56a..bc47352deb1f 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
| @@ -378,17 +378,6 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
| 378 | * single-stepped a copy of the instruction. The address of this | 378 | * single-stepped a copy of the instruction. The address of this |
| 379 | * copy is p->ainsn.insn. | 379 | * copy is p->ainsn.insn. |
| 380 | */ | 380 | */ |
| 381 | static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) | ||
| 382 | { | ||
| 383 | int ret; | ||
| 384 | unsigned int insn = *p->ainsn.insn; | ||
| 385 | |||
| 386 | regs->nip = (unsigned long)p->addr; | ||
| 387 | ret = emulate_step(regs, insn); | ||
| 388 | if (ret == 0) | ||
| 389 | regs->nip = (unsigned long)p->addr + 4; | ||
| 390 | } | ||
| 391 | |||
| 392 | static int __kprobes post_kprobe_handler(struct pt_regs *regs) | 381 | static int __kprobes post_kprobe_handler(struct pt_regs *regs) |
| 393 | { | 382 | { |
| 394 | struct kprobe *cur = kprobe_running(); | 383 | struct kprobe *cur = kprobe_running(); |
| @@ -406,7 +395,8 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) | |||
| 406 | cur->post_handler(cur, regs, 0); | 395 | cur->post_handler(cur, regs, 0); |
| 407 | } | 396 | } |
| 408 | 397 | ||
| 409 | resume_execution(cur, regs); | 398 | /* Adjust nip to after the single-stepped instruction */ |
| 399 | regs->nip = (unsigned long)cur->addr + 4; | ||
| 410 | regs->msr |= kcb->kprobe_saved_msr; | 400 | regs->msr |= kcb->kprobe_saved_msr; |
| 411 | 401 | ||
| 412 | /*Restore back the original saved kprobes variables and continue. */ | 402 | /*Restore back the original saved kprobes variables and continue. */ |
