From: Oleg Nesterov Date: Wed, 17 Jun 2009 23:27:32 +0000 (-0700) Subject: ptrace: cleanup check/set of PT_PTRACED during attach X-Git-Tag: v2.6.31-rc1~219 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2f0b00ad61d53adfecb8bdf8f3cf8f05f6ed548;p=pandora-kernel.git ptrace: cleanup check/set of PT_PTRACED during attach ptrace_attach() and ptrace_traceme() are the last functions which look as if the untraced task can have task->ptrace != 0, this must not be possible. Change the code to just check ->ptrace != 0 and s/|=/=/ to set PT_PTRACED. Also, a couple of trivial whitespace cleanups in ptrace_attach(). And move ptrace_traceme() up near ptrace_attach() to keep them close to each other. Signed-off-by: Oleg Nesterov Cc: Chris Wright Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed