• J. Bruce Fields's avatar
    svcrpc: modifying valid sunrpc cache entries is racy · 31f7aa65
    J. Bruce Fields authored
    Once a sunrpc cache entry is VALID, we should be replacing it (and
    allowing any concurrent users to destroy it on last put) instead of
    trying to update it in place.
    
    Otherwise someone referencing the ip_map we're modifying here could try
    to use the m_client just as we're putting the last reference.
    
    The bug should only be seen by users of the legacy nfsd interfaces.
    
    (Thanks to Neil for suggestion to use sunrpc_invalidate.)
    Reviewed-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    31f7aa65
svcauth_unix.c 22 KB