Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2003 21:57:56 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 40368 for review
Message-ID:  <200310240457.h9O4vuAY026136@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=40368

Change 40368 by sam@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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310240457.h9O4vuAY026136>