]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: Fix wrong use of ssk->sdp_disconnect
authorAmir Vadai <amirv@mellanox.co.il>
Wed, 16 Jun 2010 08:46:56 +0000 (11:46 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:03 +0000 (05:05 -0700)
Due to miss-use of sdp_disconnect rx cq is not armed after disconnect is
sent

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_rx.c

index 1fe68ce60f239dab7bb38afc1a0066893c03c6d7..37200011caa192197e2569fc2288a2c81f30dd6a 100644 (file)
@@ -375,7 +375,7 @@ struct sdp_sock {
        unsigned keepalive_rx_head;
 
        int destructed_already;
-       int sdp_disconnect;
+       int sdp_disconnect; /* Need to send SDP_MID_DISCONNECT */
        int id_destroyed_already; /* for sdp_remove_device() only */
 
        struct sdp_rx_ring rx_ring;
index 2c6f80de8eab8f90f31cc3936c6347c22633e91b..92eb692ca06d1f7be9c6716cec83e1806d174013 100644 (file)
@@ -871,7 +871,7 @@ int sdp_process_rx(struct sdp_sock *ssk)
                }
        }
 
-       if (ssk->sdp_disconnect || ssk->tx_sa)
+       if (unlikely(sk->sk_state != TCP_ESTABLISHED || ssk->tx_sa))
                sdp_arm_rx_cq(sk);
 
        rx_ring_unlock(&ssk->rx_ring);