public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix task_struct leak in ptrace
@ 2005-11-11  8:28 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2005-11-11  8:28 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-11  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11  8:28 [PATCH] fix task_struct leak in ptrace Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox