summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorStephen Kitt <steve@sk2.org>2020-05-15 18:02:22 +0200
committerJonathan Corbet <corbet@lwn.net>2020-05-15 11:24:25 -0600
commit2f4c33063ad713e3a5b63002cf8362846e78bd71 (patch)
tree67a21f668d9b68b6df0c153c25afaa22aa94cc18 /kernel
parent56b62540782bfde459acc8eb15b949eaf151c881 (diff)
docs: sysctl/kernel: document ngroups_max
This is a read-only export of NGROUPS_MAX, so this patch also changes the declarations in kernel/sysctl.c to const. Signed-off-by: Stephen Kitt <steve@sk2.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200515160222.7994-1-steve@sk2.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8a176d8727a3..2ba9f449d273 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -146,7 +146,7 @@ static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
static int maxolduid = 65535;
static int minolduid;
-static int ngroups_max = NGROUPS_MAX;
+static const int ngroups_max = NGROUPS_MAX;
static const int cap_last_cap = CAP_LAST_CAP;
/*
@@ -883,7 +883,7 @@ static struct ctl_table kern_table[] = {
#endif
{
.procname = "ngroups_max",
- .data = &ngroups_max,
+ .data = (void *)&ngroups_max,
.maxlen = sizeof (int),
.mode = 0444,
.proc_handler = proc_dointvec,