Skip to content
Commit f5b40e36 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5528e568
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment