diff options
author | John Baldwin <jhb@FreeBSD.org> | 2001-05-24 18:04:29 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2001-05-24 18:04:29 +0000 |
commit | 190609dd48b42678141934248d836da0c67471b1 (patch) | |
tree | 900e13020f8f9df327607bf00b44c4fa677181a8 /sys/vm/vm_unix.c | |
parent | ba83773edc60049d8b2a7b8c00b9d7f94047d97b (diff) | |
download | src-190609dd48b42678141934248d836da0c67471b1.tar.gz src-190609dd48b42678141934248d836da0c67471b1.zip |
Stick VM syscalls back under Giant if the BLEED option is not defined.
Notes
Notes:
svn path=/head/; revision=77139
Diffstat (limited to 'sys/vm/vm_unix.c')
-rw-r--r-- | sys/vm/vm_unix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index f4efc2e7ffd3..0dfb83eb1f39 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); |