Skip to content

Commit

Permalink
[IA64] find thread for user rbs address
Browse files Browse the repository at this point in the history
I encountered one problem when running ptrace test case the situation
is this: traced process's syscall parameter needs to be accessed, but
for sys_clone system call with clone_flag (CLONE_VFORK | CLONE_VM |
SIGCHLD) parameter.  This syscall's parameter accessing result is wrong.

The reason is that vforked child process mm point is the same, but
tgid is different. Without this patch find_thread_for_addr will return
vforked process if vforked process is also stopped, but not the thread
which calls vfork syscall.

Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
bibo,mao authored and Tony Luck committed Feb 5, 2007
1 parent ae0af3e commit 87f76d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
*/
list_for_each_safe(this, next, &current->children) {
p = list_entry(this, struct task_struct, sibling);
if (p->mm != mm)
if (p->tgid != child->tgid)
continue;
if (thread_matches(p, addr)) {
child = p;
Expand Down

0 comments on commit 87f76d3

Please sign in to comment.