Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2832559ybk; Mon, 18 May 2020 09:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4h3fTzlQkj5DOXPkwDInZnLjFPpIVg4Z+FAOup8m4d234w+zzUDk3CqRPAI+tknEDRsRy X-Received: by 2002:a17:906:abce:: with SMTP id kq14mr14800694ejb.187.1589817618125; Mon, 18 May 2020 09:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589817618; cv=none; d=google.com; s=arc-20160816; b=MXPBUGVaCtuRORg72X5/dZ43kuFz0A3GkwAOLcJNQuaU5nSnSuj6Qs3tOuFPjIGcx9 dHEfEpqK6bp5PLDVXj6NfsMrtZjlD0uHD4BtImsfmTrCDTHXsqtAvtOOAuTfp2C0bHiL e8IspCR4gCoMchDdkfha8YALI1Yuv0pWwQVOUfupDr4sg5QSBP+H1xBVVDazF6K1XDOR iUxAjvgd9zPIzTwW1taheIH1l0ehwE09SO9gAuK1JXiRChfO8puFjGpaQwRYL1OgsegQ 6UXhkiKCrw6bV2/nUWReQ5nMKsHcBaQlGEYTIV9srPKPHH6L5o5pq+Ux+gJCRlhBcJWh wHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Eyo3BRJITMD249uleWvPtn+zYMCUvhV6i6sXN6oZcTc=; b=LX8r7efz7IzaR8JXRaFS1SltPQMTHvO+/jpNg+RZctUdK7Vgh7V1P1gQr73SZbQu/F erzMU7/fiwnehiCed6GY0a5qpYsFgvfTNXVbCJUWErdqxHC6ERSlLY/dorc/4ESgcsc9 POzgQRqFEKoobWJXTD2geFkv9iCc2gUUpG/EJFVgFYQCqn0Gw0gzAfIbGulm54zFnEx2 ysyf3X2iAO1lqcTRUdIPFyx7lvg6yjep7+qArod7sLp33CSjdH5KMZVJY4mCDs7OC8lf kxJYxG+jz9S6lrTjaK2sZwPpiZ9v8jDm40sicKLAws5SVeEnbDQPzwGznZIxX92WWV/3 WvsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si6375354ejs.266.2020.05.18.08.59.54; Mon, 18 May 2020 09:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgERP6D (ORCPT + 99 others); Mon, 18 May 2020 11:58:03 -0400 Received: from 7.mo173.mail-out.ovh.net ([46.105.44.159]:42985 "EHLO 7.mo173.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbgERP6D (ORCPT ); Mon, 18 May 2020 11:58:03 -0400 Received: from player798.ha.ovh.net (unknown [10.110.171.40]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 51B0B13D621 for ; Mon, 18 May 2020 17:58:01 +0200 (CEST) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player798.ha.ovh.net (Postfix) with ESMTPSA id 29568129663CE; Mon, 18 May 2020 15:57:55 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G00222661789-8dca-4ca8-b9c0-ddda35ef7b93,684EF6CDF7F8D64881578A2CD861565D4C1A1A2F) smtp.auth=steve@sk2.org From: Stephen Kitt To: Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Stephen Kitt Subject: [PATCH] sysctl: const-ify ngroups_max Date: Mon, 18 May 2020 17:57:27 +0200 Message-Id: <20200518155727.10514-1-steve@sk2.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 12720698623947722133 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedruddthedgleegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeetgedugfelkeeikeetgeegteevfeeufeetuefgudeiiedthfehtdeffeekvdeffeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeelkedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehsthgvvhgvsehskhdvrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ngroups_max is a read-only sysctl entry, reflecting NGROUPS_MAX. Make it const, in the same way as cap_last_cap. Signed-off-by: Stephen Kitt --- This is split out from 2f4c33063ad7 ("docs: sysctl/kernel: document ngroups_max") which conflicted with f461d2dcd511 ("sysctl: avoid forward declarations"). kernel/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 349cab382081..cc1fcba9d4d2 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -133,7 +133,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; /* @@ -2232,7 +2232,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, base-commit: bdecf38f228bcca73b31ada98b5b7ba1215eb9c9 -- 2.20.1