kill PT_ATTACHED
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 8 Feb 2008 12:18:58 +0000 (04:18 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:26 +0000 (09:22 -0800)
commit6b39c7bfbd1436836c0fb34c5b437fda1a7a3dd4
tree60d3d9719eef3076527fcbf9c3cb362fe0f52d61
parent01b8b07a5d77d22e609267dcae74d15e3e9c5f13
kill PT_ATTACHED

Since the patch

"Fix ptrace_attach()/ptrace_traceme()/de_thread() race"
commit f5b40e363ad6041a96e3da32281d8faa191597b9

we set PT_ATTACHED and change child->parent "atomically" wrt task_list lock.

This means we can remove the checks like "PT_ATTACHED && ->parent != ptracer"
which were needed to catch the "ptrace attach is in progress" case.  We can
also remove the flag itself since nobody else uses it.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/ptrace.h
kernel/exit.c
kernel/ptrace.c
kernel/signal.c