From owner-freebsd-current@FreeBSD.ORG Tue Jun 20 08:12:37 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21BAE16A474 for ; Tue, 20 Jun 2006 08:12:37 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D893643D58 for ; Tue, 20 Jun 2006 08:12:35 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 55403 invoked from network); 20 Jun 2006 08:12:10 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 20 Jun 2006 08:12:10 -0000 Message-ID: <4497ADF6.8000106@freebsd.org> Date: Tue, 20 Jun 2006 10:12:38 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: YAMAMOTO Shigeru References: <20060620.095538.55718139.shigeru@iij.ad.jp> In-Reply-To: <20060620.095538.55718139.shigeru@iij.ad.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: tcp_syncache.hashbase should be zero cleared before calling mtx_init() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2006 08:12:37 -0000 YAMAMOTO Shigeru wrote: > Hi, all, > > When I testing -current, my pc panic at booting time. > Message is 'lock "tcp_sc_head" XXXX already initialized'. > > So, I read @src/sys/netinet/tcp_syncache.c. > It seems me that 'tcp_syncache.hashbase' should be zero cleared before > calling, > > 289 mtx_init(&tcp_syncache.hashbase[i].sch_mtx, "tcp_sc_head > 289 ", > 290 NULL, MTX_DEF); > > Is it right? Yes. I committed your fix in rev. 1.93 of tcp_syncache.c. Thanks -- Andre > Thanks, > ------- > YAMAMOTO Shigeru > > P.S. > currently, I'm using following local patch. > > > ------------------------------------------------------------------------ > > Index: sys/netinet/tcp_syncache.c > =================================================================== > RCS file: /share/cvsup/FreeBSD/current/usr/src/sys/netinet/tcp_syncache.c,v > retrieving revision 1.92 > diff -u -r1.92 tcp_syncache.c > --- sys/netinet/tcp_syncache.c 18 Jun 2006 13:03:42 -0000 1.92 > +++ sys/netinet/tcp_syncache.c 19 Jun 2006 03:01:00 -0000 > @@ -281,7 +281,7 @@ > /* Allocate the hash table. */ > MALLOC(tcp_syncache.hashbase, struct syncache_head *, > tcp_syncache.hashsize * sizeof(struct syncache_head), > - M_SYNCACHE, M_WAITOK); > + M_SYNCACHE, M_WAITOK | M_ZERO); > > /* Initialize the hash buckets. */ > for (i = 0; i < tcp_syncache.hashsize; i++) { > > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"