• Al Viro's avatar
    autofs4: autofs4_wait() vs. autofs4_catatonic_mode() race · 4041bcdc
    Al Viro authored
    We need to recheck ->catatonic after autofs4_wait() got ->wq_mutex
    for good, or we might end up with wq inserted into queue after
    autofs4_catatonic_mode() had done its thing.  It will stick there
    forever, since there won't be anything to clear its ->name.name.
    
    A bit of a complication: validate_request() drops and regains ->wq_mutex.
    It actually ends up the most convenient place to stick the check into...
    Acked-by: default avatarIan Kent <raven@themaw.net>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    4041bcdc
waitq.c 13.7 KB