• Ingo Molnar's avatar
    [PATCH] Re: do_syslog/__down_trylock lockup in current BK · 0d8b3b44
    Ingo Molnar authored
    This fixes the lockup.
    
    The bug happened because reparenting in the CLONE_THREAD case was done in
    a fundamentally non-atomic way, which was asking for various races to
    happen: eg. the target parent gets reparented to the currently exiting
    thread ...
    
    (the non-CLONE_THREAD case is safe because nothing reparents init.)
    
    the solution is to make all of reparenting atomic (including the
    forget_original_parent() bit) - this is possible with some reorganization
    done in signal.c and exit.c. This also made some of the loops simpler.
    0d8b3b44
exit.c 18.9 KB