• Andrew Morton's avatar
    [PATCH] disassociate_ctty SMP fix · 01ffc65c
    Andrew Morton authored
    Patch from Rik van Riel <riel@conectiva.com.br>
    
    the following patch, against today's BK tree, fixes a small
    SMP race in disassociate_ctty.  This function gets called
    from do_exit, without the BKL held.
    
    However, it sets the *tty variable before grabbing the bkl,
    then makes decisions on what the variable was set to before
    the lock was grabbed, despite the fact that another process
    could modify its ->tty pointer in this same function.
    01ffc65c
tty_io.c 60.6 KB