diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index a63713d2fdea..5cdff1dc407c 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");