From: mvs Date: Tue, 6 Aug 2024 20:14:56 +0000 (+0000) Subject: For consistency with other similar sysctl(2) variables use X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=59401b77e1fbba48051dec816f5f33c0970fe43b;p=openbsd For consistency with other similar sysctl(2) variables use atomic_load_int(9) while loading `somaxconn' and `sominconn'. ok bluhm --- diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 76bed84885a..83e5c133d82 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.341 2024/08/01 17:19:01 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.342 2024/08/06 20:14:56 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -234,8 +234,8 @@ sobind(struct socket *so, struct mbuf *nam, struct proc *p) int solisten(struct socket *so, int backlog) { - int somaxconn_local = READ_ONCE(somaxconn); - int sominconn_local = READ_ONCE(sominconn); + int somaxconn_local = atomic_load_int(&somaxconn); + int sominconn_local = atomic_load_int(&sominconn); int error; switch (so->so_type) {