• Sagi Grimberg's avatar
    iser-target: release stale iser connections · 6b10c0fd
    Sagi Grimberg authored
    commit 2f1b6b7d upstream.
    
    When receiving a new iser connect request we serialize
    the pending requests by adding the newly created iser connection
    to the np accept list and let the login thread process the connect
    request one by one (np_accept_wait).
    
    In case we received a disconnect request before the iser_conn
    has begun processing (still linked in np_accept_list) we should
    detach it from the list and clean it up and not have the login
    thread process a stale connection. We do it only when the connection
    state is not already terminating (initiator driven disconnect) as
    this might lead us to access np_accept_mutex after the np was released
    in live shutdown scenarios.
    Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
    Signed-off-by: default avatarJenny Falkovich <jennyf@mellanox.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    
    6b10c0fd
ib_isert.c 81.4 KB