提交 87f76d3a 编写于 作者: B bibo,mao 提交者: Tony Luck

[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: NTony Luck <tony.luck@intel.com>
上级 ae0af3e3
无相关合并请求
...@@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr) ...@@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
*/ */
list_for_each_safe(this, next, &current->children) { list_for_each_safe(this, next, &current->children) {
p = list_entry(this, struct task_struct, sibling); p = list_entry(this, struct task_struct, sibling);
if (p->mm != mm) if (p->tgid != child->tgid)
continue; continue;
if (thread_matches(p, addr)) { if (thread_matches(p, addr)) {
child = p; child = p;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部