summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-05-23 10:26:36 +0000
committeralfred <alfred@FreeBSD.org>2001-05-23 10:26:36 +0000
commitba66967415c99b346103066694a58b55e7b75cc8 (patch)
treeb70325751653a4687f5698187aafe6ffe1b2a532 /sys/kern
parent08c28f0caa526b0e0c23b4552971c4be2486d8c1 (diff)
downloadFreeBSD-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.c2
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);
OpenPOWER on IntegriCloud