• Jenny Derzhavetz's avatar
    iser-target: Rework connection termination · 6d1fba0c
    Jenny Derzhavetz authored
    When we receive an event that triggers connection termination,
    we have a a couple of things we may want to do:
    1. In case we are already terminating, bailout early
    2. In case we are connected but not bound, disconnect and schedule
       a connection cleanup silently (don't reinstate)
    3. In case we are connected and bound, disconnect and reinstate the connection
    
    This rework fixes a bug that was detected against a mis-behaved
    initiator which rejected our rdma_cm accept, in this stage the
    isert_conn is no bound and reinstate caused a bogus dereference.
    
    What's great about this is that we don't need the
    post_recv_buf_count anymore, so get rid of it.
    Signed-off-by: default avatarJenny Derzhavetz <jennyf@mellanox.com>
    Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
    Cc: stable@vger.kernel.org # v3.10+
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    6d1fba0c
ib_isert.c 90.7 KB