diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-11-01 19:33:10 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-11-01 19:33:10 +0000 |
commit | 27404c8cc91c8a638bc12c1f7859c0f116e4f70b (patch) | |
tree | f672eed10f21b50c18a985d3b0c27e7f58c85fde | |
parent | 61ba46d718cb44b562b5dc21bfeb737feaec0d5a (diff) |
Push the KERNEL_LOCK() down in uvm_map_inentry().
The lookup in uvm_map_inentry_fix() is already serialized by the
vm_map_lock and such lookup is already executed w/o the KERNEL_LOCK().
ok kettenis@, deraadt@
-rw-r--r-- | sys/uvm/uvm_map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index b805abfc706..89ed1876317 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.248 2019/11/01 19:18:29 mpi Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.249 2019/11/01 19:33:09 mpi Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -1872,16 +1872,16 @@ uvm_map_inentry(struct proc *p, struct p_inentry *ie, vaddr_t addr, boolean_t ok = TRUE; if (uvm_map_inentry_recheck(serial, addr, ie)) { - KERNEL_LOCK(); ok = uvm_map_inentry_fix(p, ie, addr, fn, serial); if (!ok) { printf(fmt, p->p_p->ps_comm, p->p_p->ps_pid, p->p_tid, addr, ie->ie_start, ie->ie_end); + KERNEL_LOCK(); p->p_p->ps_acflag |= AMAP; sv.sival_ptr = (void *)PROC_PC(p); trapsignal(p, SIGSEGV, 0, SEGV_ACCERR, sv); + KERNEL_UNLOCK(); } - KERNEL_UNLOCK(); } return (ok); } |