aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/kprobes.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 90518e43aba0..fc4d2676264f 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -435,6 +435,23 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
435 /* another task is sharing our hash bucket */ 435 /* another task is sharing our hash bucket */
436 continue; 436 continue;
437 437
438 orig_ret_address = (unsigned long)ri->ret_addr;
439 if (orig_ret_address != trampoline_address)
440 /*
441 * This is the real return address. Any other
442 * instances associated with this task are for
443 * other calls deeper on the call stack
444 */
445 break;
446 }
447
448 regs->cr_iip = orig_ret_address;
449
450 hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
451 if (ri->task != current)
452 /* another task is sharing our hash bucket */
453 continue;
454
438 if (ri->rp && ri->rp->handler) 455 if (ri->rp && ri->rp->handler)
439 ri->rp->handler(ri, regs); 456 ri->rp->handler(ri, regs);
440 457
@@ -452,8 +469,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
452 469
453 kretprobe_assert(ri, orig_ret_address, trampoline_address); 470 kretprobe_assert(ri, orig_ret_address, trampoline_address);
454 471
455 regs->cr_iip = orig_ret_address;
456
457 reset_current_kprobe(); 472 reset_current_kprobe();
458 spin_unlock_irqrestore(&kretprobe_lock, flags); 473 spin_unlock_irqrestore(&kretprobe_lock, flags);
459 preempt_enable_no_resched(); 474 preempt_enable_no_resched();