mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
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)
This commit is contained in:
parent
e7ade28530
commit
bea41bcf3a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12226
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user