Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2008 16:52:01 GMT
From:      Steve Wise <swise@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 135327 for review
Message-ID:  <200802131652.m1DGq1lw006468@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135327

Change 135327 by swise@swise:vic10:iwarp on 2008/02/13 16:51:46

	Always call t3_send_reset() with inp lock held.

Affected files ...

.. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#12 edit

Differences ...

==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#12 (text+ko) ====

@@ -2349,7 +2349,7 @@
 	struct toepcb *toep = tp->t_toe;
 	int keep = 0;
 
-	DPRINTF("do_peer_fin state=%d dead=%d\n", tp->t_state, !!dead);
+	DPRINTF("do_peer_fin state=%d\n", tp->t_state);
 	
 #ifdef T3_TRACE
 	T3_TRACE0(TIDTB(sk),"do_peer_fin:");
@@ -2360,13 +2360,16 @@
 		
 		goto out;
 	}
+	INP_INFO_WLOCK(&tcbinfo);
+	INP_LOCK(tp->t_inpcb);
 	if (toep->tp_ulp_mode == ULP_MODE_TCPDDP) {
 		keep = handle_peer_close_data(so, m);
-		if (keep < 0)
+		if (keep < 0) {
+			INP_INFO_WUNLOCK(&tcbinfo);
+			INP_UNLOCK(tp->t_inpcb);					
 			return;
+		}
 	}
-	INP_INFO_WLOCK(&tcbinfo);
-	INP_LOCK(tp->t_inpcb);
 	if (TCPS_HAVERCVDFIN(tp->t_state) == 0) 
 		socantrcvmore(so);
 	switch (tp->t_state) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802131652.m1DGq1lw006468>