From: Amir Vadai Date: Sun, 26 Oct 2008 13:07:38 +0000 (+0200) Subject: sdp: do nothing when getting FIN after IB teardown started X-Git-Tag: v4.1.12-92~264^2~5^2~309 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=94c0df4a990bdf19aa450621f0a00c7df6d0ea8d;p=users%2Fjedix%2Flinux-maple.git sdp: do nothing when getting FIN after IB teardown started Fixes bug at: https://bugs.openfabrics.org/show_bug.cgi?id=1302 Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c index 4677df0debd5a..d60b25724a425 100644 --- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c +++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c @@ -132,6 +132,11 @@ static void sdp_fin(struct sock *sk) /* This is a mutual close situation and we've got the DREQ from the peer before the SDP_MID_DISCONNECT */ break; + case TCP_CLOSE: + /* FIN arrived after IB teardown started - do nothing */ + sdp_dbg(sk, "%s: fin in state %s\n", + __func__, sdp_state_str(sk->sk_state)); + return; default: sdp_warn(sk, "%s: FIN in unexpected state. sk->sk_state=%d\n", __func__, sk->sk_state);