From b07c4f20ce10ef8d40c5a0bb60103e66b224af07 Mon Sep 17 00:00:00 2001 From: Amir Vadai Date: Thu, 20 Nov 2008 12:56:39 +0200 Subject: [PATCH] SDP: BUG1348 - sockets are left in CLOSE state with ref count > 0 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 --- drivers/infiniband/ulp/sdp/sdp_cma.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index 64f9f38afcbe..46adfd7e6661 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -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; -- 2.50.1