summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-06-17 13:27:40 +0000
committeralc <alc@FreeBSD.org>2002-06-17 13:27:40 +0000
commit66c467d04e4c97adee7c7d8137b1f51dc8f0ad15 (patch)
treec91a9ee328e6880c3023f104fc0d576236a3c6d0 /sys
parent430283afe94c92778112801870bcff08a68e84b4 (diff)
downloadFreeBSD-src-66c467d04e4c97adee7c7d8137b1f51dc8f0ad15.zip
FreeBSD-src-66c467d04e4c97adee7c7d8137b1f51dc8f0ad15.tar.gz
o Acquire and release Giant in vm_map_wakeup() to prevent
a lost wakeup(). Reviewed by: tegge
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 85b88b4..d8e07f2 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -435,6 +435,13 @@ static __inline void
vm_map_wakeup(vm_map_t map)
{
+ /*
+ * Acquire and release Giant to prevent a wakeup() from being
+ * performed (and lost) between the vm_map_unlock() and the
+ * tsleep() in vm_map_unlock_and_wait().
+ */
+ mtx_lock(&Giant);
+ mtx_unlock(&Giant);
wakeup(&map->root);
}
OpenPOWER on IntegriCloud