summaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-11-14 01:06:33 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-14 03:14:11 +0100
commit005f18dfd0ed86c39716277b61dfb4bd2af91059 (patch)
tree8425228dc52bb38a5fe85d52afaecacca2f3a6fd /kernel/ptrace.c
parent[PATCH] fbdev: fix module dependency loop (diff)
downloadlinux-005f18dfd0ed86c39716277b61dfb4bd2af91059.tar.xz
linux-005f18dfd0ed86c39716277b61dfb4bd2af91059.zip
[PATCH] fix task_struct leak in ptrace
When ptrace_attach fails we need to drop the task_struct reference. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index b88d4186cd7a..17ee7e5a3451 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -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);