From 1e5f4b2192659b8c8e40a7789e61e2e3fe177a34 Mon Sep 17 00:00:00 2001 From: kn Date: Sat, 17 Dec 2022 13:42:59 +0000 Subject: [PATCH] Unlock minherit(2) struct uvm_map's .addr is protected by the map's lock and .{min,max}_offset are immutable. uvm_map_inherit() locks the VM map upon entry, sets the desired inheritance mode for the given address range (validated outside the lock) and unlocks the map itself. fork(2), i.e. uvm_mapent_forkcopy(), first locks both old and new maps and then copies entries over as per the inheritance type. futex(2), another user of struct vm_map_entry's .inheritance member, also locks the map accordingly. OK mpi --- sys/kern/syscalls.master | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 99554dbfc27..85bae7ec8ab 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.237 2022/11/30 10:20:37 mvs Exp $ +; $OpenBSD: syscalls.master,v 1.238 2022/12/17 13:42:59 kn Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -445,7 +445,7 @@ 247 UNIMPL 248 UNIMPL 249 UNIMPL -250 STD { int sys_minherit(void *addr, size_t len, \ +250 STD NOLOCK { int sys_minherit(void *addr, size_t len, \ int inherit); } 251 OBSOL rfork 252 STD { int sys_poll(struct pollfd *fds, \ -- 2.20.1