summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_unix.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-05-24 18:04:29 +0000
committerjhb <jhb@FreeBSD.org>2001-05-24 18:04:29 +0000
commitcb02b9b724a347c73fd99267684264847cf49a62 (patch)
tree490a81921284727f506b15fd315cb9dfcfddce66 /sys/vm/vm_unix.c
parentd6ea0013a09ad4a15cc4d506760a8c4f77a5d347 (diff)
downloadFreeBSD-src-cb02b9b724a347c73fd99267684264847cf49a62.zip
FreeBSD-src-cb02b9b724a347c73fd99267684264847cf49a62.tar.gz
Stick VM syscalls back under Giant if the BLEED option is not defined.
Diffstat (limited to 'sys/vm/vm_unix.c')
-rw-r--r--sys/vm/vm_unix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
index f4efc2e..0dfb83e 100644
--- a/sys/vm/vm_unix.c
+++ b/sys/vm/vm_unix.c
@@ -44,6 +44,8 @@
/*
* Traditional sbrk/grow interface to VM
*/
+#include "opt_bleed.h"
+
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -99,6 +101,9 @@ obreak(p, uap)
vm_size_t diff;
diff = new - old;
+#ifndef BLEED
+ mtx_lock(&Giant);
+#endif
mtx_lock(&vm_mtx);
rv = vm_map_find(&vm->vm_map, NULL, 0, &old, diff, FALSE,
VM_PROT_ALL, VM_PROT_ALL, 0);
@@ -108,6 +113,9 @@ obreak(p, uap)
}
vm->vm_dsize += btoc(diff);
mtx_unlock(&vm_mtx);
+#ifndef BLEED
+ mtx_unlock(&Giant);
+#endif
} else if (new < old) {
mtx_lock(&Giant);
mtx_lock(&vm_mtx);
OpenPOWER on IntegriCloud