Date: Wed, 6 Dec 2006 19:43:54 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 111211 for review Message-ID: <200612061943.kB6Jhspd077506@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111211 Change 111211 by zec@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612061943.kB6Jhspd077506>