PERFORCE change 135327 for review

Steve Wise swise at FreeBSD.org
Wed Feb 13 08:52:02 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=135327

Change 135327 by swise at 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) {


More information about the p4-projects mailing list