PERFORCE change 40368 for review
Sam Leffler
sam at FreeBSD.org
Thu Oct 23 21:57:58 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=40368
Change 40368 by sam at sam_ebb on 2003/10/23 21:57:19
allocate memory holding mutex's pre-zero'd so mtx_init
doesn't panic because a mutex is already initialized
when WINESS is enabled
Affected files ...
.. //depot/projects/hostcache/sys/netinet/tcp_hostcache.c#4 edit
Differences ...
==== //depot/projects/hostcache/sys/netinet/tcp_hostcache.c#4 (text+ko) ====
@@ -218,10 +218,12 @@
/*
* Allocate the hash table
+ *
+ * NB: M_ZERO is to keep WITNESS happy.
*/
MALLOC(tcp_hostcache.hashbase, struct hc_head *,
tcp_hostcache.hashsize * sizeof(struct hc_head),
- M_HOSTCACHE, M_WAITOK);
+ M_HOSTCACHE, M_WAITOK | M_ZERO);
/*
* Initialize the hash buckets
More information about the p4-projects
mailing list