• Long Li's avatar
    cifs: smbd: avoid reconnect lockup · 48f238a7
    Long Li authored
    During transport reconnect, other processes may have registered memory
    and blocked on transport. This creates a deadlock situation because the
    transport resources can't be freed, and reconnect is blocked.
    
    Fix this by returning to upper layer on timeout. Before returning,
    transport status is set to reconnecting so other processes will release
    memory registration resources.
    
    Upper layer will retry the reconnect. This is not in fast I/O path so
    setting the timeout to 5 seconds.
    Signed-off-by: default avatarLong Li <longli@microsoft.com>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
    CC: Stable <stable@vger.kernel.org>
    48f238a7
smbdirect.c 73.8 KB