aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/kprobes.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 8516a94d8163..9d0f0d09d473 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -271,23 +271,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
271} 271}
272 272
273/* Called with kretprobe_lock held */ 273/* Called with kretprobe_lock held */
274void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, 274void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
275 struct pt_regs *regs) 275 struct pt_regs *regs)
276{ 276{
277 struct kretprobe_instance *ri; 277 ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14];
278 278
279 if ((ri = get_free_rp_inst(rp)) != NULL) { 279 /* Replace the return addr with trampoline addr */
280 ri->rp = rp; 280 regs->gprs[14] = (unsigned long)&kretprobe_trampoline;
281 ri->task = current;
282 ri->ret_addr = (kprobe_opcode_t *) regs->gprs[14];
283
284 /* Replace the return addr with trampoline addr */
285 regs->gprs[14] = (unsigned long)&kretprobe_trampoline;
286
287 add_rp_inst(ri);
288 } else {
289 rp->nmissed++;
290 }
291} 281}
292 282
293static int __kprobes kprobe_handler(struct pt_regs *regs) 283static int __kprobes kprobe_handler(struct pt_regs *regs)