summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-07-12 23:20:06 +0000
committeralc <alc@FreeBSD.org>2002-07-12 23:20:06 +0000
commit80b0a79553aa58dc7fad5b59d3f868ce0f12bd6d (patch)
tree43564014c2663f3a14063b7bb872eaf927d40114 /sys/vm/vm_map.c
parent7cb243d2f4ee007a1b508dc2b4b1c8e98124b31a (diff)
downloadFreeBSD-src-80b0a79553aa58dc7fad5b59d3f868ce0f12bd6d.zip
FreeBSD-src-80b0a79553aa58dc7fad5b59d3f868ce0f12bd6d.tar.gz
o Assert GIANT_REQUIRED on system maps in _vm_map_lock(),
_vm_map_lock_read(), and _vm_map_trylock(). Submitted by: tegge o Remove GIANT_REQUIRED from kmem_alloc_wait() and kmem_free_wakeup(). (This clears the way for exec_map accesses to move outside of Giant. The exec_map is not a system map.) o Remove some premature MPSAFE comments. Reviewed by: tegge
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 21b91d0..6b107db 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -360,6 +360,8 @@ _vm_map_lock(vm_map_t map, const char *file, int line)
{
int error;
+ if (map->system_map)
+ GIANT_REQUIRED;
error = lockmgr(&map->lock, LK_EXCLUSIVE, NULL, curthread);
KASSERT(error == 0, ("%s: failed to get lock", __func__));
map->timestamp++;
@@ -377,6 +379,8 @@ _vm_map_lock_read(vm_map_t map, const char *file, int line)
{
int error;
+ if (map->system_map)
+ GIANT_REQUIRED;
error = lockmgr(&map->lock, LK_EXCLUSIVE, NULL, curthread);
KASSERT(error == 0, ("%s: failed to get lock", __func__));
}
@@ -393,6 +397,8 @@ _vm_map_trylock(vm_map_t map, const char *file, int line)
{
int error;
+ if (map->system_map)
+ GIANT_REQUIRED;
error = lockmgr(&map->lock, LK_EXCLUSIVE | LK_NOWAIT, NULL, curthread);
return (error == 0);
}
OpenPOWER on IntegriCloud