kprobes: kretprobes simplifications
[linux-2.6.git] / arch / s390 / kernel / kprobes.c
index 8516a94d81636a8a705e55ddbf6d353dabf89a5c..9d0f0d09d4735614953c8ed894292364c621090e 100644 (file)
@@ -271,23 +271,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
 }
 
 /* Called with kretprobe_lock held */
-void __kprobes arch_prepare_kretprobe(struct kretprobe *rp,
+void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
                                        struct pt_regs *regs)
 {
-       struct kretprobe_instance *ri;
+       ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14];
 
-       if ((ri = get_free_rp_inst(rp)) != NULL) {
-               ri->rp = rp;
-               ri->task = current;
-               ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14];
-
-               /* Replace the return addr with trampoline addr */
-               regs->gprs[14] = (unsigned long)&kretprobe_trampoline;
-
-               add_rp_inst(ri);
-       } else {
-               rp->nmissed++;
-       }
+       /* Replace the return addr with trampoline addr */
+       regs->gprs[14] = (unsigned long)&kretprobe_trampoline;
 }
 
 static int __kprobes kprobe_handler(struct pt_regs *regs)