Date: Tue, 20 Jun 2006 10:12:38 +0200 From: Andre Oppermann <andre@freebsd.org> To: YAMAMOTO Shigeru <shigeru@iij.ad.jp> Cc: freebsd-current@freebsd.org Subject: Re: tcp_syncache.hashbase should be zero cleared before calling mtx_init() Message-ID: <4497ADF6.8000106@freebsd.org> In-Reply-To: <20060620.095538.55718139.shigeru@iij.ad.jp> References: <20060620.095538.55718139.shigeru@iij.ad.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <shigeru@iij.ad.jp> > > 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4497ADF6.8000106>