diff options
author | 2017-10-09 08:35:38 +0000 | |
---|---|---|
committer | 2017-10-09 08:35:38 +0000 | |
commit | df4a15bc1fe47e27f4c1e62e865ee303c6e12c79 (patch) | |
tree | a59104b5975da8c5e1e2cfb35e2bffb33fc729ab /sys/kern/uipc_domain.c | |
parent | Correct logic check preventing the device to attach. (diff) | |
download | wireguard-openbsd-df4a15bc1fe47e27f4c1e62e865ee303c6e12c79.tar.xz wireguard-openbsd-df4a15bc1fe47e27f4c1e62e865ee303c6e12c79.zip |
Reduces the scope of the NET_LOCK() in sysctl(2) path.
Exposes per-CPU counters to real parrallelism.
ok visa@, bluhm@, jca@
Diffstat (limited to 'sys/kern/uipc_domain.c')
-rw-r--r-- | sys/kern/uipc_domain.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index b2a43a41cd5..4cfbe5de4ff 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_domain.c,v 1.52 2017/08/11 21:24:19 mpi Exp $ */ +/* $OpenBSD: uipc_domain.c,v 1.53 2017/10/09 08:35:38 mpi Exp $ */ /* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */ /* @@ -207,10 +207,8 @@ net_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, protocol = name[1]; for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) if (pr->pr_protocol == protocol && pr->pr_sysctl) { - NET_LOCK(); error = (*pr->pr_sysctl)(name + 2, namelen - 2, oldp, oldlenp, newp, newlen); - NET_UNLOCK(); return (error); } return (ENOPROTOOPT); |