[ofa-general] sdp: do nothing when getting FIN after IB teardown started

Amir Vadai amirv at mellanox.co.il
Sun Oct 26 06:37:23 PDT 2008


Fixes bug at:
https://bugs.openfabrics.org/show_bug.cgi?id=1302

Signed-off-by: Amir Vadai <amirv at mellanox.co.il>
---
 drivers/infiniband/ulp/sdp/sdp_bcopy.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index 4677df0..d60b257 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);
-- 
1.5.4.3




More information about the general mailing list