• Oleg Drokin's avatar
    nfsd: Always lock state exclusively. · feb9dad5
    Oleg Drokin authored
    It used to be the case that state had an rwlock that was locked for write
    by downgrades, but for read for upgrades (opens). Well, the problem is
    if there are two competing opens for the same state, they step on
    each other toes potentially leading to leaking file descriptors
    from the state structure, since access mode is a bitmap only set once.
    Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
state.h 22.1 KB