diff options
author | rstone <rstone@FreeBSD.org> | 2015-03-01 04:39:07 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2015-03-01 04:39:07 +0000 |
commit | a206bae4b50455151b72b8dcc537faca3445f288 (patch) | |
tree | f4affce76fc926adda355037deea138832a8adf7 /sys/vm/vm_map.c | |
parent | 6d2b81bc2b6be4fb624d6c4c6ed85a8ec8c54409 (diff) | |
download | FreeBSD-src-a206bae4b50455151b72b8dcc537faca3445f288.zip FreeBSD-src-a206bae4b50455151b72b8dcc537faca3445f288.tar.gz |
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.
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r-- | sys/vm/vm_map.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index a63713d..5cdff1d 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -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"); |