diff options
author | alc <alc@FreeBSD.org> | 2002-06-17 13:27:40 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-06-17 13:27:40 +0000 |
commit | 66c467d04e4c97adee7c7d8137b1f51dc8f0ad15 (patch) | |
tree | c91a9ee328e6880c3023f104fc0d576236a3c6d0 /sys | |
parent | 430283afe94c92778112801870bcff08a68e84b4 (diff) | |
download | FreeBSD-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.c | 7 |
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); } |