Allocate a zero'ed syncache hashtable. mtx_init() tests the supplied

memory location for already existing/initialized mutexes.  With random
data in the memory location this fails (ie. after a soft reboot).

Reported by:	brueffer, YAMAMOTO Shigeru
Submitted by:	YAMAMOTO Shigeru <shigeru-at-iij.ad.jp>
This commit is contained in:
Andre Oppermann 2006-06-20 08:11:30 +00:00
parent 35a6917047
commit c9f7b0ad5b

View File

@ -281,7 +281,7 @@ syncache_init(void)
/* 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++) {