PERFORCE change 41549 for review

Sam Leffler sam at FreeBSD.org
Wed Nov 5 19:56:53 PST 2003


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

Change 41549 by sam at sam_ebb on 2003/11/05 19:56:38

	hold the inp lock across tcp_respond; it is needed to
	insure consistency of the inpcb contents

Affected files ...

.. //depot/projects/netperf/sys/netinet/tcp_input.c#9 edit

Differences ...

==== //depot/projects/netperf/sys/netinet/tcp_input.c#9 (text+ko) ====

@@ -2348,9 +2348,6 @@
 			  &tcp_savetcp, 0);
 #endif
 
-	if (tp)
-		INP_UNLOCK(inp);
-
 	if (thflags & TH_ACK)
 		/* mtod() below is safe as long as hdr dropping is delayed */
 		tcp_respond(tp, mtod(m, void *), th, m, (tcp_seq)0, th->th_ack,
@@ -2362,6 +2359,9 @@
 		tcp_respond(tp, mtod(m, void *), th, m, th->th_seq+tlen,
 			    (tcp_seq)0, TH_RST|TH_ACK);
 	}
+
+	if (tp)
+		INP_UNLOCK(inp);
 	if (headlocked)
 		INP_INFO_WUNLOCK(&tcbinfo);
 	return;


More information about the p4-projects mailing list