From: Linus Torvalds Date: Sun, 7 May 2006 17:49:33 +0000 (-0700) Subject: Fix ptrace_attach()/ptrace_traceme()/de_thread() race X-Git-Tag: v2.6.17-rc4~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b40e363ad6041a96e3da32281d8faa191597b9;p=pandora-kernel.git Fix ptrace_attach()/ptrace_traceme()/de_thread() race This holds the task lock (and, for ptrace_attach, the tasklist_lock) over the actual attach event, which closes a race between attacking to a thread that is either doing a PTRACE_TRACEME or getting de-threaded. Thanks to Oleg Nesterov for reminding me about this, and Chris Wright for noticing a lost return value in my first version. Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed