-; $OpenBSD: syscalls.master,v 1.256 2023/12/21 19:34:07 miod Exp $
+; $OpenBSD: syscalls.master,v 1.257 2024/01/26 18:24:23 mvs Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
socklen_t namelen); }
105 STD NOLOCK { int sys_setsockopt(int s, int level, int name, \
const void *val, socklen_t valsize); }
-106 STD { int sys_listen(int s, int backlog); }
+106 STD NOLOCK { int sys_listen(int s, int backlog); }
107 STD { int sys_chflagsat(int fd, const char *path, \
u_int flags, int atflags); }
108 STD NOLOCK { int sys_pledge(const char *promises, \
-/* $OpenBSD: uipc_socket.c,v 1.314 2024/01/12 10:48:03 bluhm Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.315 2024/01/26 18:24:23 mvs Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
int
solisten(struct socket *so, int backlog)
{
+ int somaxconn_local = READ_ONCE(somaxconn);
+ int sominconn_local = READ_ONCE(sominconn);
int error;
soassertlocked(so);
return (error);
if (TAILQ_FIRST(&so->so_q) == NULL)
so->so_options |= SO_ACCEPTCONN;
- if (backlog < 0 || backlog > somaxconn)
- backlog = somaxconn;
- if (backlog < sominconn)
- backlog = sominconn;
+ if (backlog < 0 || backlog > somaxconn_local)
+ backlog = somaxconn_local;
+ if (backlog < sominconn_local)
+ backlog = sominconn_local;
so->so_qlimit = backlog;
return (0);
}