lkml.org 
[lkml]   [2005]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[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>

Index: linux-2.6/kernel/ptrace.c
===================================================================
--- linux-2.6.orig/kernel/ptrace.c 2005-11-11 00:10:29.000000000 +0100
+++ linux-2.6/kernel/ptrace.c 2005-11-11 00:11:21.000000000 +0100
@@ -485,7 +485,7 @@

if (request == PTRACE_ATTACH) {
ret = ptrace_attach(child);
- goto out;
+ goto out_put_task_struct;
}

ret = ptrace_check_attach(child, request == PTRACE_KILL);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-11-11 09:31    [W:0.075 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site