From owner-cvs-all@FreeBSD.ORG Tue Nov 11 10:04:34 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22B3016A4CF for ; Tue, 11 Nov 2003 10:04:34 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 01C4C43FE0 for ; Tue, 11 Nov 2003 10:04:30 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 39399 invoked from network); 11 Nov 2003 18:04:29 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 11 Nov 2003 18:04:29 -0000 X-pair-Authenticated: 209.68.2.70 Date: Tue, 11 Nov 2003 12:04:27 -0600 (CST) From: Mike Silbersack To: Sam Leffler In-Reply-To: <200311111754.hABHslNG062585@repoman.freebsd.org> Message-ID: <20031111120300.Y16061@odysseus.silby.com> References: <200311111754.hABHslNG062585@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_syncache.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 18:04:34 -0000 On Tue, 11 Nov 2003, Sam Leffler wrote: > sam 2003/11/11 09:54:47 PST > > FreeBSD src repository > > Modified files: > sys/netinet tcp_syncache.c > Log: > o add missing inpcb locking in tcp_respond > o replace spl's with lock assertions > > Supported by: FreeBSD Foundation Part of this looks goofy to me: @@ -377,14 +374,12 @@ syncache_timer(xslot) intptr_t slot = (intptr_t)xslot; struct syncache *sc, *nsc; struct inpcb *inp; - int s; - s = splnet(); INP_INFO_WLOCK(&tcbinfo); if (callout_pending(&tcp_syncache.tt_timerq[slot]) || !callout_active(&tcp_syncache.tt_timerq[slot])) { - INP_INFO_WUNLOCK(&tcbinfo); - splx(s); + /* XXX can this happen? */ + INP_INFO_WLOCK(&tcbinfo); return; } callout_deactivate(&tcp_syncache.tt_timerq[slot]); @@ -421,8 +416,7 @@ syncache_timer(xslot) if (nsc != NULL) callout_reset(&tcp_syncache.tt_timerq[slot], nsc->sc_rxttime - ticks, syncache_timer, (void *)(slot)); - INP_INFO_WUNLOCK(&tcbinfo); - splx(s); + INP_INFO_WLOCK(&tcbinfo); } Shouldn't those WUNLOCK calls stay as WUNLOCK? Mike "Silby" Silbersack