diff options
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 0f8d053b4c5..326265d56f2 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.401 2022/03/14 22:38:43 tb Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.402 2022/03/21 09:12:34 bluhm Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1366,16 +1366,24 @@ sysctl_file(int *name, u_int namelen, char *where, size_t *sizep, struct inpcb *inp; NET_LOCK(); + mtx_enter(&tcbtable.inpt_mtx); TAILQ_FOREACH(inp, &tcbtable.inpt_queue, inp_queue) FILLSO(inp->inp_socket); + mtx_leave(&tcbtable.inpt_mtx); + mtx_enter(&udbtable.inpt_mtx); TAILQ_FOREACH(inp, &udbtable.inpt_queue, inp_queue) FILLSO(inp->inp_socket); + mtx_leave(&udbtable.inpt_mtx); + mtx_enter(&rawcbtable.inpt_mtx); TAILQ_FOREACH(inp, &rawcbtable.inpt_queue, inp_queue) FILLSO(inp->inp_socket); + mtx_leave(&rawcbtable.inpt_mtx); #ifdef INET6 + mtx_enter(&rawin6pcbtable.inpt_mtx); TAILQ_FOREACH(inp, &rawin6pcbtable.inpt_queue, inp_queue) FILLSO(inp->inp_socket); + mtx_leave(&rawin6pcbtable.inpt_mtx); #endif NET_UNLOCK(); } |