summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-11-12 08:58:58 +0000
committerdg <dg@FreeBSD.org>1995-11-12 08:58:58 +0000
commit867529addcb60d59dfa383c4c693cc4c5b802ff6 (patch)
tree7b4f9624aee39d49a20cf5bb870ecc884ddda86d /sys
parent86c893fd834cf5a753a3393fd4451ad0cc8125a2 (diff)
downloadFreeBSD-src-867529addcb60d59dfa383c4c693cc4c5b802ff6.zip
FreeBSD-src-867529addcb60d59dfa383c4c693cc4c5b802ff6.tar.gz
Moved vm_map_lock call to inside the splhigh protection in vm_map_find().
This closes a probably rare but nonetheless real window that would result in a process hanging or the system panicing. Reviewed by: dyson, davidg Submitted by: kato@eclogite.eps.nagoya-u.ac.jp (KATO Takenori)
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 2c04dff..309c9af 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.24 1995/08/26 23:18:38 bde Exp $
+ * $Id: vm_map.c,v 1.25 1995/10/23 05:35:44 dyson Exp $
*/
/*
@@ -765,11 +765,11 @@ vm_map_find(map, object, offset, addr, length, find_space)
int result, s = 0;
start = *addr;
- vm_map_lock(map);
if (map == kmem_map)
s = splhigh();
+ vm_map_lock(map);
if (find_space) {
if (vm_map_findspace(map, start, length, addr)) {
vm_map_unlock(map);
OpenPOWER on IntegriCloud