svn commit: r277649 - head/sys/vm
Ryan Stone
rstone at FreeBSD.org
Sat Jan 24 16:59:39 UTC 2015
Author: rstone
Date: Sat Jan 24 16:59:38 2015
New Revision: 277649
URL: https://svnweb.freebsd.org/changeset/base/277649
Log:
vmspace_release() may sleep if the last reference is being released,
so add a WITNESS_WARN() to catch cases where it is called with a
non-sleepable lock held.
MFC after: 1 month
Sponsored by: Sandvine Inc.
Modified:
head/sys/vm/vm_map.c
Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c Sat Jan 24 15:49:40 2015 (r277648)
+++ head/sys/vm/vm_map.c Sat Jan 24 16:59:38 2015 (r277649)
@@ -344,6 +344,9 @@ void
vmspace_free(struct vmspace *vm)
{
+ WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
+ "vmspace_free() called with non-sleepable lock held");
+
if (vm->vm_refcnt == 0)
panic("vmspace_free: attempt to free already freed vmspace");
More information about the svn-src-head
mailing list