diff options
author | alc <alc@FreeBSD.org> | 2002-11-25 04:37:44 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-11-25 04:37:44 +0000 |
commit | 9925b3077debb1e760379e66e8c1d89bce4bbbeb (patch) | |
tree | 129b87d9dd7a7ed0549f1b9045382667424e66b1 /sys | |
parent | a1b905df44c3c40bda6d149d21a5f6203a4e803e (diff) | |
download | FreeBSD-src-9925b3077debb1e760379e66e8c1d89bce4bbbeb.zip FreeBSD-src-9925b3077debb1e760379e66e8c1d89bce4bbbeb.tar.gz |
Acquire and release the page queues lock around pmap_remove_pages() because
it updates several of vm_page's fields.
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 e6364bf..8f64cf4 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 6f745a0..0ee27b7 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; |