From owner-p4-projects@FreeBSD.ORG Wed Dec 6 19:48:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBDA316A4C9; Wed, 6 Dec 2006 19:48:10 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE85316A588 for ; Wed, 6 Dec 2006 19:48:09 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0A2544091 for ; Wed, 6 Dec 2006 19:43:27 +0000 (GMT) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kB6JhtsG077509 for ; Wed, 6 Dec 2006 19:43:55 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kB6Jhspd077506 for perforce@freebsd.org; Wed, 6 Dec 2006 19:43:54 GMT (envelope-from zec@FreeBSD.org) Date: Wed, 6 Dec 2006 19:43:54 GMT Message-Id: <200612061943.kB6Jhspd077506@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 111211 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2006 19:48:11 -0000 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);