Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm In uvm_useracc(), make sure we have a read lock on t...
details: https://anonhg.NetBSD.org/src/rev/93c7ea465892
branches: trunk
changeset: 473732:93c7ea465892
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Jun 17 05:57:33 1999 +0000
description:
In uvm_useracc(), make sure we have a read lock on the map before
calling uvm_map_checkprot().
diffstat:
sys/uvm/uvm_glue.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r b6c8e6a1b5ea -r 93c7ea465892 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Thu Jun 17 05:11:47 1999 +0000
+++ b/sys/uvm/uvm_glue.c Thu Jun 17 05:57:33 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.24 1999/06/17 00:24:10 thorpej Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.25 1999/06/17 05:57:33 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -157,11 +157,18 @@
size_t len;
int rw;
{
+ vm_map_t map;
boolean_t rv;
vm_prot_t prot = rw == B_READ ? VM_PROT_READ : VM_PROT_WRITE;
- rv = uvm_map_checkprot(&curproc->p_vmspace->vm_map,
- trunc_page(addr), round_page(addr+len), prot);
+ /* XXX curproc */
+ map = &curproc->p_vmspace->vm_map;
+
+ vm_map_lock_read(map);
+ rv = uvm_map_checkprot(map, trunc_page(addr), round_page(addr+len),
+ prot);
+ vm_map_unlock_read(map);
+
return(rv);
}
Home |
Main Index |
Thread Index |
Old Index