git: 5ec6907c0a90 - stable/13 - kern: Remove CTLFLAG_NEEDGIANT from some sysctls.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jan 2022 01:27:44 UTC
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5ec6907c0a908335cd5390d66e75b51c80e9ef10 commit 5ec6907c0a908335cd5390d66e75b51c80e9ef10 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-12-26 17:02:28 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2022-01-09 01:24:10 +0000 kern: Remove CTLFLAG_NEEDGIANT from some sysctls. MFC after: 2 weeks (cherry picked from commit fe27f1db5f0b67ad2681a35253f7c1a4dc9874f8) --- sys/kern/kern_acct.c | 2 +- sys/kern/kern_sendfile.c | 2 +- sys/kern/kern_sig.c | 2 +- sys/kern/uipc_sockbuf.c | 2 +- sys/kern/uipc_socket.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index ad272676083e..2a8d2f892807 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -187,7 +187,7 @@ sysctl_acct_chkfreq(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_kern, OID_AUTO, acct_chkfreq, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &acctchkfreq, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &acctchkfreq, 0, sysctl_acct_chkfreq, "I", "frequency for checking the free space"); diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index d3043d16f4ec..e724a28487d6 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -158,7 +158,7 @@ sfstat_sysctl(SYSCTL_HANDLER_ARGS) return (SYSCTL_OUT(req, &s, sizeof(s))); } SYSCTL_PROC(_kern_ipc, OID_AUTO, sfstat, - CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0, + CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sfstat_sysctl, "I", "sendfile statistics"); diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 0c5e9f41f153..6f656ba92107 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3577,7 +3577,7 @@ sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_debug, OID_AUTO, ncores, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_debug_num_cores_check, "I", "Maximum number of generated process corefiles while using index format"); diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index bb179043682e..d4db19598392 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -1784,7 +1784,7 @@ sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb) static int dummy; SYSCTL_INT(_kern, KERN_DUMMY, dummy, CTLFLAG_RW | CTLFLAG_SKIP, &dummy, 0, ""); SYSCTL_OID(_kern_ipc, KIPC_MAXSOCKBUF, maxsockbuf, - CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &sb_max, 0, + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, &sb_max, 0, sysctl_handle_sb_max, "LU", "Maximum socket buffer size"); SYSCTL_ULONG(_kern_ipc, KIPC_SOCKBUF_WASTE, sockbuf_waste_factor, CTLFLAG_RW, diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 5d2139cb4a31..1fd63640988b 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -238,11 +238,11 @@ sysctl_somaxconn(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_kern_ipc, OID_AUTO, soacceptqueue, - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, sizeof(int), + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_somaxconn, "I", "Maximum listen socket pending connection accept queue size"); SYSCTL_PROC(_kern_ipc, KIPC_SOMAXCONN, somaxconn, - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT, 0, + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_SKIP | CTLFLAG_MPSAFE, 0, sizeof(int), sysctl_somaxconn, "I", "Maximum listen socket pending connection accept queue size (compat)"); @@ -374,7 +374,7 @@ sysctl_maxsockets(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsockets, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, &maxsockets, 0, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &maxsockets, 0, sysctl_maxsockets, "IU", "Maximum number of sockets available");