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.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 3d54ad7dd1f9..aed58e1cb91f 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -126,22 +126,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
126} 126}
127 127
128/* Called with kretprobe_lock held */ 128/* Called with kretprobe_lock held */
129void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, 129void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
130 struct pt_regs *regs) 130 struct pt_regs *regs)
131{ 131{
132 struct kretprobe_instance *ri; 132 ri->ret_addr = (kprobe_opcode_t *)regs->link;
133 133
134 if ((ri = get_free_rp_inst(rp)) != NULL) { 134 /* Replace the return addr with trampoline addr */
135 ri->rp = rp; 135 regs->link = (unsigned long)kretprobe_trampoline;
136 ri->task = current;
137 ri->ret_addr = (kprobe_opcode_t *)regs->link;
138
139 /* Replace the return addr with trampoline addr */
140 regs->link = (unsigned long)kretprobe_trampoline;
141 add_rp_inst(ri);
142 } else {
143 rp->nmissed++;
144 }
145} 136}
146 137
147static int __kprobes kprobe_handler(struct pt_regs *regs) 138static int __kprobes kprobe_handler(struct pt_regs *regs)