Messages in this thread Patch in this message | | | Date | Fri, 11 Nov 2005 09:28:43 +0100 | From | Christoph Hellwig <> | 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/
| |