• Roland McGrath's avatar
    [PATCH] fix exec deadlock when ptrace used inside the thread group · 0f9dea3f
    Roland McGrath authored
    If one thread uses ptrace on another thread in the same thread group, there
    can be a deadlock when calling exec.  The ptrace_stop change ensures that
    no tracing stop can be entered for a queued signal, or exit tracing, if the
    tracer is part of the same dying group.  The exit_notify change prevents a
    ptrace zombie from sticking around if its tracer is in the midst of a group
    exit (which an exec fakes), so these zombies don't hold up de_thread's
    synchronization.  The de_thread change ensures the new thread group leader
    doesn't wind up ptracing itself, which would produce its own deadlocks.
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    0f9dea3f
exit.c 38.5 KB