From: Amir Vadai Date: Thu, 20 Nov 2008 10:56:39 +0000 (+0200) Subject: SDP: BUG1348 - sockets are left in CLOSE state with ref count > 0 X-Git-Tag: v4.1.12-92~264^2~5^2~304 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b07c4f20ce10ef8d40c5a0bb60103e66b224af07;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index 64f9f38afcbee..46adfd7e6661c 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;