• Roland McGrath's avatar
    [PATCH] Fix ptrace problem · 66edd549
    Roland McGrath authored
    This is indeed a new bug, and it is not architecture-specific.  In my
    recent changes to close some race conditions, I overlooked the case of a
    process using PTRACE_ATTACH on its own children.  The new PT_ATTACHED flag
    does not really mean "PTRACE_ATTACH was used", it means "PTRACE_ATTACH is
    changing the ->parent link".
    
    This fixes the problem that Stephane Eranian program demonstrates.
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    66edd549
ptrace.c 7.74 KB