From patchwork Thu Mar 6 12:35:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Bouchinet X-Patchwork-Id: 14004422 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657EA20B7EB; Thu, 6 Mar 2025 12:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264534; cv=none; b=u2dqpqIsCttRGlceLz0yFdTMI9b4fzxG9PXgdUd6GDxaNJq9Px597lkx6jplghr4vJ+zRXDmEkMVQv292ZuN1nIoVFUo2EGCf/ZRFwQfH2hdUT4pQd+MNyhXl5SpgBhRXayP8WUhGnO1nqbVT9H+xxa+aWpOcG628EitEGVVSAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264534; c=relaxed/simple; bh=KYLE385lYBDE+b0rW4pq24p5hzoXwRewcZlo53DkeuA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dTU6qHwWtAf9WDWPtvEC/g77VNPNvTbJvxjbtpDf4Ovb+L9QaFvSLoSmLmH920agl2sDs7G6oi46AHRhAUoWWkzlC4g79jxzggYYyarZq9MneS+xnSDi4ytvUiMSaCUGvAxGDLb+ViX+2RHx+3p6kxq/7pRYsei3yHt3t0Lx0Ls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org; spf=pass smtp.mailfrom=clip-os.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b=feEV66fm; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=clip-os.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b="feEV66fm" Received: by mail.gandi.net (Postfix) with ESMTPSA id AD6AA4424F; Thu, 6 Mar 2025 12:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clip-os.org; s=gm1; t=1741264530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bKGPv+VkKk+jMpdUIOW6EvNju9ijdlaeQ1JxJiPSdBc=; b=feEV66fmn/UIC3rJWk1YmSAQePrruvbUjH9AEbG6BXTcAjsPXf+dWVt1qNrUm3ux4CA5K3 35GpdpBe4Ulqufq0rnMR5VLO+lHgxWpytYxVXon+JXLSI/NxEquAf3hgZWi2HKAZVd2GVa 4R7cwnPKMR7DWJHYprHI3aX429XvaFUWPwUo09+93j46SRAZzTaCMZYdZdFrxqhtVQleUJ z8HVJScmIzpjAjHhIC+wI4yEvxNciRvUAEXHiaeaEWNUEFlFd30e9XMFqBmVvttmBWZGNl zhOfdsrOOlm/MdivSWYnlT6InlbS3+hbPaWrBoMWsqj05zR9139Jqb6QcS1yDQ== From: nicolas.bouchinet@clip-os.org To: coda@cs.cmu.edu, linux-kernel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-nfs@vger.kernel.org Cc: Nicolas Bouchinet , Joel Granados , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , Jan Harkes , Trond Myklebust , Anna Schumaker Subject: [PATCH v3 1/3] sysctl: Fixes idmap_cache_timeout bounds Date: Thu, 6 Mar 2025 13:35:08 +0100 Message-ID: <20250306123514.386434-2-nicolas.bouchinet@clip-os.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> References: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpehnihgtohhlrghsrdgsohhutghhihhnvghtsegtlhhiphdqohhsrdhorhhgnecuggftrfgrthhtvghrnhepteehfeetkeeujeethfehieelhfejfeduteejieelveegfeefieeuheeiteethfevnecukfhppeeltddrieefrddvgeeirddukeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledtrdeifedrvdegiedrudekjedphhgvlhhopegrrhgthhhlihhnuhigrddrpdhmrghilhhfrhhomhepnhhitgholhgrshdrsghouhgthhhinhgvthestghlihhpqdhoshdrohhrghdpnhgspghrtghpthhtohepuddvpdhrtghpthhtoheptghouggrsegtshdrtghmuhdrvgguuhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohgurghlihhsthestghouggrrdgtshdrtghmuhdrvgguuhdprhgtphhtthhopehlihhnuhigqdhnfhhssehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepnhhitgholhgrshdrsghouhgthhhinhgvthesshhsihdrghhou hhvrdhfrhdprhgtphhtthhopehjrdhgrhgrnhgrughoshesshgrmhhsuhhnghdrtghomhdprhgtphhtthhopegtlhgvmhgvnhhssehlrgguihhstghhrdguvgdprhgtphhtthhopegrrhhnugesrghrnhgusgdruggv X-GND-Sasl: nicolas.bouchinet@clip-os.org From: Nicolas Bouchinet Bound idmap_cache_timeout sysctl writings between SYSCTL_ZERO and SYSCTL_INT_MAX. The proc_handler has thus been updated to proc_dointvec_minmax. Signed-off-by: Nicolas Bouchinet --- fs/nfs/nfs4sysctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/nfs/nfs4sysctl.c b/fs/nfs/nfs4sysctl.c index d1a92d8f8ba4c..c36d89afb13af 100644 --- a/fs/nfs/nfs4sysctl.c +++ b/fs/nfs/nfs4sysctl.c @@ -32,7 +32,9 @@ static const struct ctl_table nfs4_cb_sysctls[] = { .data = &nfs_idmap_cache_timeout, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, }; From patchwork Thu Mar 6 12:35:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Bouchinet X-Patchwork-Id: 14004423 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B62B7202C5C; Thu, 6 Mar 2025 12:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264535; cv=none; b=ROhiSePfGHIHt/WXHoAOHol3YBhiDV1GIMLN3n/LJflur2SMq121v6SY39blgIT53CYccJTCfvnMWIUnwENByE640MB4DpswZHArm0LpGXJciYjKwjGBlTgeeLuJHqfOW5ZwYxf2jFYe7LsKwGJZSdjj3lUwSV4Ckxfa4vilHCY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264535; c=relaxed/simple; bh=yllEYqYVMLCt2QLV5kyEAqh6tj3UnOxIPtDxhcZ4mco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tBObkbQQ6LVg73gQAIUovo0QqgnXZBp92Yx76f7QejDydwaihrZU0XOu/t0/xjla92cxf22HZPbB93sI5PL6ZgJ3ZugZC1waccBOkWggnlTnxLncCqRH1MkERjg9HyPztlfqj6xOojAWIkek2ssQJgjopFjDwUq8CdiDz9sqXeg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org; spf=pass smtp.mailfrom=clip-os.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b=Enrrbqrt; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=clip-os.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b="Enrrbqrt" Received: by mail.gandi.net (Postfix) with ESMTPSA id D3D504328A; Thu, 6 Mar 2025 12:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clip-os.org; s=gm1; t=1741264531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k4NWIVIP5PfuUyZ0qRIWf49V6Zi3c0xIKE7a82+fDhM=; b=EnrrbqrtY/+13mPnVJbeO92Znj8jTGD3OdD8SkMsRoMy1nTuJUKiI8FqNl5h7mxN4nxxVo L0Sf/9iPxp0I2Ji5fm1RPs6lwdYX+hOXoIHH09IIKmHyNmGvStTux/AHwoWtZjIRsh/kJL E4osovlp38TQgMP1NE+u5jyYL/bTsIuecDsszJQjjULY96TbUhNPj4i1qwvuDz0kOUgElD xtEUzFcAkho69OQRsndxqUaeAxyT41VYtGxjZJ1rlPzcci6Dpd4+VYw9u80I3yQzTCwmkn l87A0fA/5K8s0HBfzqYS8oLI1WC5JUy/zF/WTw2W6oK3kiry6Lk0VyPmp+F+wA== From: nicolas.bouchinet@clip-os.org To: coda@cs.cmu.edu, linux-kernel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-nfs@vger.kernel.org Cc: Nicolas Bouchinet , Joel Granados , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , Jan Harkes , Trond Myklebust , Anna Schumaker Subject: [PATCH v3 2/3] sysctl/coda: Fixes timeout bounds Date: Thu, 6 Mar 2025 13:35:09 +0100 Message-ID: <20250306123514.386434-3-nicolas.bouchinet@clip-os.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> References: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpehnihgtohhlrghsrdgsohhutghhihhnvghtsegtlhhiphdqohhsrdhorhhgnecuggftrfgrthhtvghrnhepvddvuedutdeifedvleegjeeuudetuddvlefgteeludehueehvdevvdefveelueejnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepledtrdeifedrvdegiedrudekjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeltddrieefrddvgeeirddukeejpdhhvghloheprghrtghhlhhinhhugidrrddpmhgrihhlfhhrohhmpehnihgtohhlrghsrdgsohhutghhihhnvghtsegtlhhiphdqohhsrdhorhhgpdhnsggprhgtphhtthhopeduvddprhgtphhtthhopegtohgurgestghsrdgtmhhurdgvughupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheptghouggrlhhishhtsegtohgurgdrtghsrdgtmhhurdgvughupdhrtghpthhtoheplhhinhhugidqnhhfshesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehnihgtohhlr ghsrdgsohhutghhihhnvghtsehsshhirdhgohhuvhdrfhhrpdhrtghpthhtohepjhdrghhrrghnrgguohhssehsrghmshhunhhgrdgtohhmpdhrtghpthhtoheptghlvghmvghnsheslhgrughishgthhdruggvpdhrtghpthhtoheprghrnhgusegrrhhnuggsrdguvg X-GND-Sasl: nicolas.bouchinet@clip-os.org From: Nicolas Bouchinet Bound coda timeout sysctl writings between SYSCTL_ZERO and SYSCTL_INT_MAX. The proc_handler has thus been updated to proc_dointvec_minmax. coda_timeout type has been updated from an unsigned long to an unsigned int since it is typically set to some value well under a minute. Signed-off-by: Nicolas Bouchinet --- Changes since v2: https://lore.kernel.org/all/20250224095826.16458-4-nicolas.bouchinet@clip-os.org/ * Changed coda_timeout type from unsigned long to unsigned int as suggested by Joel Granados and Jan Harkes. --- fs/coda/coda_int.h | 2 +- fs/coda/sysctl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h index f82b59c9dd287..c7fc4c5a77d58 100644 --- a/fs/coda/coda_int.h +++ b/fs/coda/coda_int.h @@ -6,7 +6,7 @@ struct dentry; struct file; extern struct file_system_type coda_fs_type; -extern unsigned long coda_timeout; +extern unsigned int coda_timeout; extern int coda_hard; extern int coda_fake_statfs; diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 0df46f09b6cc5..d6f8206c51575 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -20,7 +20,9 @@ static const struct ctl_table coda_table[] = { .data = &coda_timeout, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, { .procname = "hard", From patchwork Thu Mar 6 12:35:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Bouchinet X-Patchwork-Id: 14004424 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA6C620C03C; Thu, 6 Mar 2025 12:35:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264537; cv=none; b=hLcNNrGqEz228g8zysyrs6cZkDoDZuiGhg5tML1j6lbSxzjlQxccrT5P96zDQgAfyEitZ0nGBKBg+QV6XIqeWoRqFpNA4AMrSwrl8gPMuKBiFiJiPmsiR4lQ49oSsWGOMbK9j9MB2CxLeqLjMfwb4lx1UnVVa7HpBzMASB86J6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741264537; c=relaxed/simple; bh=hEdnDwVJYm+8ExpU7Gb8sRVeW+r5/QBiFQu5n+BciFc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sEtGXEsHQz5F5lF18zUeqc84/oXcFH7M5gWfi44gJVwD1CEKPpYY4A2qobrtRaW+AB9QmLwzIgb+7pUoZoQUjav5RMWdVi9F06SdzEsdz0UDPaNpcjCrXpmfY9yEJRQpcREIBtGYSlBMF+TZA5ZJy2hdHmQumY1GEJBkdP/phPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org; spf=pass smtp.mailfrom=clip-os.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b=UKIrSAgW; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=clip-os.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=clip-os.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=clip-os.org header.i=@clip-os.org header.b="UKIrSAgW" Received: by mail.gandi.net (Postfix) with ESMTPSA id 0C37B44251; Thu, 6 Mar 2025 12:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clip-os.org; s=gm1; t=1741264533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DZX6+XiM6OJ3HGkhOxfUk7v+ByCTdttaIt3fhOvtZ1o=; b=UKIrSAgWvAWf7ebts3IU6CXQztXJeLemf0lDgxFLUNAfE7LaxCHyQhYzwzh8zKJFuvbk99 RbykJYW4ySJOUC+Mabg8lepOlc4f1Vw7PjGlwbl33/IEOFQBO4XzcEvTmhHhF7l6J+XFpI /I4nUsfcT6XoVA8qqNCZD2RrQKRR0PNPc9Qg5ZvcofLwqSFAjvDpUp3KUwauTxavAGm/a4 8V61qtFjof0lc1/VYO7Em8635XiDXMkUPN93woX2zFBea6iYv7K19nlSK8xgEvpf2ymccG ZBzkaFQoQC4IzaQbC2nKrTGNuSZNjRxw8UO6qdvKonCreSaFBkIFSDmGAU/rUg== From: nicolas.bouchinet@clip-os.org To: coda@cs.cmu.edu, linux-kernel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-nfs@vger.kernel.org Cc: Nicolas Bouchinet , Joel Granados , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , Jan Harkes , Trond Myklebust , Anna Schumaker Subject: [PATCH v3 3/3] sysctl: Fixes max-user-freq bounds Date: Thu, 6 Mar 2025 13:35:10 +0100 Message-ID: <20250306123514.386434-4-nicolas.bouchinet@clip-os.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> References: <20250306123514.386434-1-nicolas.bouchinet@clip-os.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejjeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpehnihgtohhlrghsrdgsohhutghhihhnvghtsegtlhhiphdqohhsrdhorhhgnecuggftrfgrthhtvghrnhepteehfeetkeeujeethfehieelhfejfeduteejieelveegfeefieeuheeiteethfevnecukfhppeeltddrieefrddvgeeirddukeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledtrdeifedrvdegiedrudekjedphhgvlhhopegrrhgthhhlihhnuhigrddrpdhmrghilhhfrhhomhepnhhitgholhgrshdrsghouhgthhhinhgvthestghlihhpqdhoshdrohhrghdpnhgspghrtghpthhtohepuddvpdhrtghpthhtoheptghouggrsegtshdrtghmuhdrvgguuhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohgurghlihhsthestghouggrrdgtshdrtghmuhdrvgguuhdprhgtphhtthhopehlihhnuhigqdhnfhhssehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepnhhitgholhgrshdrsghouhgthhhinhgvthesshhsihdrghhou hhvrdhfrhdprhgtphhtthhopehjrdhgrhgrnhgrughoshesshgrmhhsuhhnghdrtghomhdprhgtphhtthhopegtlhgvmhgvnhhssehlrgguihhstghhrdguvgdprhgtphhtthhopegrrhhnugesrghrnhgusgdruggv X-GND-Sasl: nicolas.bouchinet@clip-os.org From: Nicolas Bouchinet Bound max-user-freq sysctl writings between SYSCTL_ZERO and SYSCTL_INT_MAX. The proc_handler has thus been updated to proc_dointvec_minmax. Signed-off-by: Nicolas Bouchinet --- drivers/char/hpet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index e110857824fcb..528b43e893d49 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -730,7 +730,9 @@ static const struct ctl_table hpet_table[] = { .data = &hpet_max_freq, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_INT_MAX, }, };