Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74767
b: refs/heads/master
c: 3661999
h: refs/heads/master
i:
  74765: 0bd1c6b
  74763: 67dc996
  74759: 0801c12
  74751: 457e822
v: v3
  • Loading branch information
Shaohua Li authored and Tony Luck committed Dec 8, 2007
1 parent 848d519 commit cf49f61
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 965d747264c91ed206846d74ae09f757a36a373b
refs/heads/master: 3661999a17b0397c7a93c200b280c55958ba3593
19 changes: 17 additions & 2 deletions trunk/arch/ia64/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,23 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
* real return address, and all the rest will point to
* kretprobe_trampoline
*/
hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
if (ri->task != current)
/* another task is sharing our hash bucket */
continue;

orig_ret_address = (unsigned long)ri->ret_addr;
if (orig_ret_address != trampoline_address)
/*
* This is the real return address. Any other
* instances associated with this task are for
* other calls deeper on the call stack
*/
break;
}

regs->cr_iip = orig_ret_address;

hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
if (ri->task != current)
/* another task is sharing our hash bucket */
Expand All @@ -452,8 +469,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)

kretprobe_assert(ri, orig_ret_address, trampoline_address);

regs->cr_iip = orig_ret_address;

reset_current_kprobe();
spin_unlock_irqrestore(&kretprobe_lock, flags);
preempt_enable_no_resched();
Expand Down

0 comments on commit cf49f61

Please sign in to comment.