From 3423689152b4a8c4ec97ef594563ec39c4336dad Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 29 Nov 2023 20:40:06 +0000 Subject: [PATCH] Unlock bind(2) syscall. For internet sockets sobind() runs with exclusive net lock due to solock(). For unix domain sockets uipc_bind() grabs the kernel lock itself. So sys_bind() is MP safe. Add NOLOCK flag to avoid kernel lock. OK mvs@ --- 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 2ed318508f0..5c60c389ffd 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.250 2023/08/20 15:13:43 visa Exp $ +; $OpenBSD: syscalls.master,v 1.251 2023/11/29 20:40:06 bluhm Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -221,7 +221,7 @@ 101 STD NOLOCK { int sys_pipe2(int *fdp, int flags); } 102 STD NOLOCK { int sys_dup3(int from, int to, int flags); } 103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } -104 STD { int sys_bind(int s, const struct sockaddr *name, \ +104 STD NOLOCK { int sys_bind(int s, const struct sockaddr *name, \ socklen_t namelen); } 105 STD NOLOCK { int sys_setsockopt(int s, int level, int name, \ const void *val, socklen_t valsize); } -- 2.20.1