summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-06-20 08:11:30 +0000
committerandre <andre@FreeBSD.org>2006-06-20 08:11:30 +0000
commit58082047f9a541923e7916e6b39bc1e5bb9d99b9 (patch)
treea4d1aac9c3e9f5acc2cdfaaf9991f8b60cde857e /sys/netinet
parent705134c2402fe70dfea7875710ead4d92b971ec2 (diff)
downloadFreeBSD-src-58082047f9a541923e7916e6b39bc1e5bb9d99b9.zip
FreeBSD-src-58082047f9a541923e7916e6b39bc1e5bb9d99b9.tar.gz
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>
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_syncache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index a46d220..12610ef 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -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++) {
OpenPOWER on IntegriCloud