Author: rstone
Date: Sun Mar  1 04:39:07 2015
New Revision: 279474
URL: https://svnweb.freebsd.org/changeset/base/279474

Log:
  MFC r277649:
  
     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:
  stable/10/sys/vm/vm_map.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_map.c
==============================================================================
--- stable/10/sys/vm/vm_map.c   Sun Mar  1 04:36:20 2015        (r279473)
+++ stable/10/sys/vm/vm_map.c   Sun Mar  1 04:39:07 2015        (r279474)
@@ -342,6 +342,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");
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to