svn commit: r205626 - head/sys/kern

Bjoern A. Zeeb bz at FreeBSD.org
Wed Mar 24 19:21:26 UTC 2010


Author: bz
Date: Wed Mar 24 19:21:26 2010
New Revision: 205626
URL: http://svn.freebsd.org/changeset/base/205626

Log:
  Print the pointer to the lock with the panic message. The previous
  	panic: rw lock not unlocked
  was not really helpful for debugging. Now one can at least call
  	show lock <ptr>
  form ddb to learn more about the lock.
  
  MFC after:	3 days

Modified:
  head/sys/kern/kern_rwlock.c

Modified: head/sys/kern/kern_rwlock.c
==============================================================================
--- head/sys/kern/kern_rwlock.c	Wed Mar 24 19:20:49 2010	(r205625)
+++ head/sys/kern/kern_rwlock.c	Wed Mar 24 19:21:26 2010	(r205626)
@@ -199,8 +199,8 @@ void
 rw_destroy(struct rwlock *rw)
 {
 
-	KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock not unlocked"));
-	KASSERT(rw->rw_recurse == 0, ("rw lock still recursed"));
+	KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock %p not unlocked", rw));
+	KASSERT(rw->rw_recurse == 0, ("rw lock %p still recursed", rw));
 	rw->rw_lock = RW_DESTROYED;
 	lock_destroy(&rw->lock_object);
 }


More information about the svn-src-head mailing list