]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
SDP: BUG1348 - sockets are left in CLOSE state with ref count > 0
authorAmir Vadai <amirv@mellanox.co.il>
Thu, 20 Nov 2008 10:56:39 +0000 (12:56 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:21 +0000 (05:04 -0700)
Removed unnecessary sock_hold() when a CM_REJECT arrives before TCP_ESTABLISHED state.
This happend in the server side when after getting CM_REQ and answering with CM_REP a CM_REJ
arrived.
The sock_hold that was removed assumed that there will be a timewait state - but according to
the spec, the state changes back to LISTEN without TIMEWAIT.

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

index 64f9f38afcbee7635c0dd2a27183d201d1fc4768..46adfd7e6661c204e30951deb814763aa57ae552 100644 (file)
@@ -536,12 +536,6 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
        sdp_dbg(sk, "%s event %d handled\n", __func__, event->event);
 
        if (rc && sdp_sk(sk)->id == id) {
-               if (sk->sk_state == TCP_SYN_RECV) {
-                       /* sdp_close() will not be called therefore we need
-                          to take a refernce till infiniband teardown is
-                          finished */
-                       sock_hold(sk, SOCK_REF_CM_TW);
-               }
                child = sk;
                sdp_sk(sk)->id = NULL;
                id->qp = NULL;