Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 2015 16:59:38 +0000 (UTC)
From:      Ryan Stone <rstone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277649 - head/sys/vm
Message-ID:  <201501241659.t0OGxcxC071104@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 



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