aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-06-26 03:26:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:27 -0400
commitd5f70c00ad24cd1158d3678b44ff969b4c971d49 (patch)
treeb4b71a71b413250fb24cb2d83cbbfd7507da9efc /kernel/ptrace.c
parent281de339ceb822ca6c04d4373ecb9a45c1890ce4 (diff)
[PATCH] coredump: kill ptrace related stuff
With this patch zap_process() sets SIGNAL_GROUP_EXIT while sending SIGKILL to the thread group. This means that a TASK_TRACED task 1. Will be awakened by signal_wake_up(1) 2. Can't sleep again via ptrace_notify() 3. Can't go to do_signal_stop() after return from ptrace_stop() in get_signal_to_deliver() So we can remove all ptrace related stuff from coredump path. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Roland McGrath <roland@redhat.com> 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 6252d2fa2bf3..335c5b932e14 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -214,7 +214,7 @@ out:
214 return retval; 214 return retval;
215} 215}
216 216
217void __ptrace_detach(struct task_struct *child, unsigned int data) 217static inline void __ptrace_detach(struct task_struct *child, unsigned int data)
218{ 218{
219 child->exit_code = data; 219 child->exit_code = data;
220 /* .. re-parent .. */ 220 /* .. re-parent .. */
@@ -233,6 +233,7 @@ int ptrace_detach(struct task_struct *child, unsigned int data)
233 ptrace_disable(child); 233 ptrace_disable(child);
234 234
235 write_lock_irq(&tasklist_lock); 235 write_lock_irq(&tasklist_lock);
236 /* protect against de_thread()->release_task() */
236 if (child->ptrace) 237 if (child->ptrace)
237 __ptrace_detach(child, data); 238 __ptrace_detach(child, data);
238 write_unlock_irq(&tasklist_lock); 239 write_unlock_irq(&tasklist_lock);