diff options
author | alfred <alfred@FreeBSD.org> | 2001-05-23 10:26:36 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-05-23 10:26:36 +0000 |
commit | ba66967415c99b346103066694a58b55e7b75cc8 (patch) | |
tree | b70325751653a4687f5698187aafe6ffe1b2a532 /sys/kern | |
parent | 08c28f0caa526b0e0c23b4552971c4be2486d8c1 (diff) | |
download | FreeBSD-src-ba66967415c99b346103066694a58b55e7b75cc8.zip FreeBSD-src-ba66967415c99b346103066694a58b55e7b75cc8.tar.gz |
aquire vm_mutex a little bit earlier to protect a pmap call.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 8c34a9a..c3508e0 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -621,6 +621,7 @@ pipe_destroy_write_buffer(wpipe) { int i; + mtx_lock(&vm_mtx); if (wpipe->pipe_map.kva) { pmap_qremove(wpipe->pipe_map.kva, wpipe->pipe_map.npages); @@ -632,7 +633,6 @@ pipe_destroy_write_buffer(wpipe) amountpipekva -= wpipe->pipe_buffer.size + PAGE_SIZE; } } - mtx_lock(&vm_mtx); for (i = 0; i < wpipe->pipe_map.npages; i++) vm_page_unwire(wpipe->pipe_map.ms[i], 1); mtx_unlock(&vm_mtx); |