svn commit: r297515 - projects/vnet/sys/kern

Bjoern A. Zeeb bz at FreeBSD.org
Sat Apr 2 19:06:34 UTC 2016


Author: bz
Date: Sat Apr  2 19:06:33 2016
New Revision: 297515
URL: https://svnweb.freebsd.org/changeset/base/297515

Log:
  Make the KASSERT message in hash destroy more informative.
  While the pointer might not be too helpful, the malloc type might
  at least give a good hint about which hashtbl we are talking.
  
  Sponsored by:	The FreeBD Foundation
  Put up as Differential Revision:	D5802

Modified:
  projects/vnet/sys/kern/subr_hash.c

Modified: projects/vnet/sys/kern/subr_hash.c
==============================================================================
--- projects/vnet/sys/kern/subr_hash.c	Sat Apr  2 16:53:12 2016	(r297514)
+++ projects/vnet/sys/kern/subr_hash.c	Sat Apr  2 19:06:33 2016	(r297515)
@@ -93,7 +93,8 @@ hashdestroy(void *vhashtbl, struct mallo
 
 	hashtbl = vhashtbl;
 	for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++)
-		KASSERT(LIST_EMPTY(hp), ("%s: hash not empty", __func__));
+		KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty "
+		    "(malloc type %s)", __func__, hashtbl, type->ks_shortdesc));
 	free(hashtbl, type);
 }
 


More information about the svn-src-projects mailing list