summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-01-03 11:07:05 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-01-03 11:07:05 +0000
commit3c73eab79ea10fe97fc7210da1c39579e026e619 (patch)
treeac192b1dbe1e5d0c465c3d95efb18f3ca686f1a4 /sys/kern
parentad7756b66ed933276e19fa4566b626000b768af1 (diff)
Run connect(2) in parallel within inet doamin.
This unlocks soconnect() for UDP, rip, rip6 and divert. It takes shared net lock in combination with per socket lock. TCP and GRE still use exclusive net lock when connecting. OK mvs@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 0a58664adca..c258936d774 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_syscalls.c,v 1.215 2023/12/18 13:11:20 bluhm Exp $ */
+/* $OpenBSD: uipc_syscalls.c,v 1.216 2024/01/03 11:07:04 bluhm Exp $ */
/* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */
/*
@@ -409,7 +409,7 @@ sys_connect(struct proc *p, void *v, register_t *retval)
if (KTRPOINT(p, KTR_STRUCT))
ktrsockaddr(p, mtod(nam, caddr_t), SCARG(uap, namelen));
#endif
- solock(so);
+ solock_shared(so);
if (isdnssocket(so)) {
error = dns_portcheck(p, so, mtod(nam, void *), nam->m_len);
if (error)
@@ -443,7 +443,7 @@ bad:
if (!interrupted)
so->so_state &= ~SS_ISCONNECTING;
unlock:
- sounlock(so);
+ sounlock_shared(so);
m_freem(nam);
out:
FRELE(fp, p);