提交 005f18df 编写于 作者: C Christoph Hellwig 提交者: Linus Torvalds

[PATCH] fix task_struct leak in ptrace

When ptrace_attach fails we need to drop the task_struct reference.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 ab767201
......@@ -470,7 +470,7 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
if (request == PTRACE_ATTACH) {
ret = ptrace_attach(child);
goto out;
goto out_put_task_struct;
}
ret = ptrace_check_attach(child, request == PTRACE_KILL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册