aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorbibo,mao <bibo.mao@intel.com>2007-01-29 22:02:19 -0500
committerTony Luck <tony.luck@intel.com>2007-02-05 17:04:21 -0500
commit87f76d3aafe5b5e0a1d6d857088a0263b35afa6b (patch)
tree80a547e0c0a0cfe2eb1764b7a2b6410cbe5463f8 /arch
parentae0af3e3462fdada42deba30479aba70c6cf8b72 (diff)
[IA64] find thread for user rbs address
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index f1ec129ae3a1..3f8918782e0c 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
607 */ 607 */
608 list_for_each_safe(this, next, &current->children) { 608 list_for_each_safe(this, next, &current->children) {
609 p = list_entry(this, struct task_struct, sibling); 609 p = list_entry(this, struct task_struct, sibling);
610 if (p->mm != mm) 610 if (p->tgid != child->tgid)
611 continue; 611 continue;
612 if (thread_matches(p, addr)) { 612 if (thread_matches(p, addr)) {
613 child = p; 613 child = p;