diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/kprobes.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 3fbef288c376..b6a9d64c2251 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -226,24 +226,15 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | /* Called with kretprobe_lock held */ | 228 | /* Called with kretprobe_lock held */ |
229 | void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, | 229 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
230 | struct pt_regs *regs) | 230 | struct pt_regs *regs) |
231 | { | 231 | { |
232 | unsigned long *sara = (unsigned long *)®s->esp; | 232 | unsigned long *sara = (unsigned long *)®s->esp; |
233 | 233 | ||
234 | struct kretprobe_instance *ri; | 234 | ri->ret_addr = (kprobe_opcode_t *) *sara; |
235 | 235 | ||
236 | if ((ri = get_free_rp_inst(rp)) != NULL) { | 236 | /* Replace the return addr with trampoline addr */ |
237 | ri->rp = rp; | 237 | *sara = (unsigned long) &kretprobe_trampoline; |
238 | ri->task = current; | ||
239 | ri->ret_addr = (kprobe_opcode_t *) *sara; | ||
240 | |||
241 | /* Replace the return addr with trampoline addr */ | ||
242 | *sara = (unsigned long) &kretprobe_trampoline; | ||
243 | add_rp_inst(ri); | ||
244 | } else { | ||
245 | rp->nmissed++; | ||
246 | } | ||
247 | } | 238 | } |
248 | 239 | ||
249 | /* | 240 | /* |