diff options
author | Alan Cox <alc@FreeBSD.org> | 2002-11-25 04:37:44 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2002-11-25 04:37:44 +0000 |
commit | 2d21129db2f1c62575fa3d1900f5df69ee36a49e (patch) | |
tree | 129b87d9dd7a7ed0549f1b9045382667424e66b1 /sys | |
parent | 37efca486e8ddcb1c7d96ddf0ec3783d20e1c098 (diff) | |
download | src-2d21129db2f1c62575fa3d1900f5df69ee36a49e.tar.gz src-2d21129db2f1c62575fa3d1900f5df69ee36a49e.zip |
Acquire and release the page queues lock around pmap_remove_pages() because
it updates several of vm_page's fields.
Notes
Notes:
svn path=/head/; revision=107216
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_exit.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index e6364bf17708..8f64cf41547b 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -843,8 +843,10 @@ exec_new_vmspace(imgp, sv) vm_map_max(map) == sv->sv_maxuser) { if (vmspace->vm_shm) shmexit(p); + vm_page_lock_queues(); pmap_remove_pages(vmspace_pmap(vmspace), vm_map_min(map), vm_map_max(map)); + vm_page_unlock_queues(); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); } else { vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser); diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 6f745a0717af..0ee27b728e59 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -76,6 +76,7 @@ #include <vm/vm_param.h> #include <vm/pmap.h> #include <vm/vm_map.h> +#include <vm/vm_page.h> #include <vm/uma.h> #include <sys/user.h> @@ -290,8 +291,10 @@ exit1(td, rv) if (--vm->vm_refcnt == 0) { if (vm->vm_shm) shmexit(p); + vm_page_lock_queues(); pmap_remove_pages(vmspace_pmap(vm), vm_map_min(&vm->vm_map), vm_map_max(&vm->vm_map)); + vm_page_unlock_queues(); (void) vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map), vm_map_max(&vm->vm_map)); vm->vm_freer = p; |