PERFORCE change 111211 for review

Marko Zec zec at FreeBSD.org
Wed Dec 6 11:48:11 PST 2006


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

Change 111211 by zec at zec_tca51 on 2006/12/06 19:43:01

	In tcp_timer_2msl_stop(), tw->tw_inpcb can be NULL, so
	attempts to read tw->tw_inpcb->inp_vnetb will not result with
	the desired outcome.  Hence, fetch a vnetb * from curvnetb
	instead.

Affected files ...

.. //depot/projects/vimage/src/sys/netinet/tcp_timer.c#5 edit

Differences ...

==== //depot/projects/vimage/src/sys/netinet/tcp_timer.c#5 (text+ko) ====

@@ -260,7 +260,7 @@
 void
 tcp_timer_init(void)
 {
-	INIT_VNET_INET(curvnetb);	/* XXX Is this safe? */
+	INIT_VNET_INET(curvnetb);
 
 	TAILQ_INIT(&V_twq_2msl);
 }
@@ -281,7 +281,7 @@
 void
 tcp_timer_2msl_stop(struct tcptw *tw)
 {
-	INIT_VNET_INET(tw->tw_inpcb->inp_vnetb);
+	INIT_VNET_INET(curvnetb);
 
 	INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
 	TAILQ_REMOVE(&V_twq_2msl, tw, tw_2msl);
@@ -290,7 +290,7 @@
 struct tcptw *
 tcp_timer_2msl_tw(int reuse)
 {
-	INIT_VNET_INET(curvnetb);	/* XXX is this safe? */
+	INIT_VNET_INET(curvnetb);
 	struct tcptw *tw;
 
 	INP_INFO_WLOCK_ASSERT(&V_tcbinfo);


More information about the p4-projects mailing list