aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/kprobes.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 353689edebd5..0b72f0f94192 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -465,23 +465,13 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
465} 465}
466 466
467/* Called with kretprobe_lock held */ 467/* Called with kretprobe_lock held */
468void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, 468void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
469 struct pt_regs *regs) 469 struct pt_regs *regs)
470{ 470{
471 struct kretprobe_instance *ri; 471 ri->ret_addr = (kprobe_opcode_t *)regs->b0;
472 472
473 if ((ri = get_free_rp_inst(rp)) != NULL) { 473 /* Replace the return addr with trampoline addr */
474 ri->rp = rp; 474 regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip;
475 ri->task = current;
476 ri->ret_addr = (kprobe_opcode_t *)regs->b0;
477
478 /* Replace the return addr with trampoline addr */
479 regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip;
480
481 add_rp_inst(ri);
482 } else {
483 rp->nmissed++;
484 }
485} 475}
486 476
487int __kprobes arch_prepare_kprobe(struct kprobe *p) 477int __kprobes arch_prepare_kprobe(struct kprobe *p)