From patchwork Mon Feb 24 09:58:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Bouchinet X-Patchwork-Id: 13987712 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (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 A4E73255E2E; Mon, 24 Feb 2025 09:59:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740391147; cv=none; b=M9xu27QOTas4k+ON9OvcL83CLUCdiJCD8C/6/yjA09g4jyEb3saMJFJGYlYXU0KyN8i2Pmx0b53nem1ep7l0IwFy+bg1z0WUOwnOjdzd1zksZqmGoOadLAoYwXmJ024DvVoz7O6DE4xFouuOu224Hi33d9RH9HUio9oXh9NQTd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740391147; c=relaxed/simple; bh=92w1mYu2LrpwoTvOF6GD+t7KNGibcy0h8niy3kMGIhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hJLAk48hePi/HnhLQr4H/mrB9zu8Nf8zOYvY/jhpncfZ6iOvzEcucWF48qDQuFXulF8gO9au5zF6TIjV2B39BJW+xKEuwLam70YX7cNQZiHCYyIZ9bleEAmUbPoZTQd15QQ/YL/mprvOiD5mSKbrsuaAWdjTY0EcowdIVdL66TY= 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=H5r1p7U9; arc=none smtp.client-ip=217.70.183.201 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="H5r1p7U9" Received: by mail.gandi.net (Postfix) with ESMTPSA id A8E8842FF1; Mon, 24 Feb 2025 09:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clip-os.org; s=gm1; t=1740391143; 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=4ftHCXoMvXNvCt7bT9Q9tu29qrzOh1bSSFP4jqAR9CQ=; b=H5r1p7U9RuTxG0DG9hwf8OPKItJi7IsEmy6t6zyiQcp/CPMR2oL2QbWlFlSjJKXBR8dEpS 3A5GtnZ4E+cGhDR0X3swv0aNr+5P14ZkEQcIkQ+qGJB4eA8oFL6jF2gCe/W2H4h2yr2JzR HZ+ljFq4xVz1eVRdenQsJZCSJM30VV2QoeMmWk3Y2QogmGUDEj6IBVxj0BWIo74HQrPj62 86oCTYppPiNJX5c8MBnZt/9xKCDDaaUi42b3IFwwYF65nCp+oiEJ4+kpw1RAxDrIVcUx6R Kg4AUD+F1CqVV0pyU8SUNZb6ZvrEJbGaheqXr8eZLbod90EocSaYwTy+2M4nGA== From: nicolas.bouchinet@clip-os.org To: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@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 , Jason Gunthorpe , Leon Romanovsky , "James E.J. Bottomley" , "Martin K. Petersen" , Jan Harkes , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker , Bart Van Assche , Zhu Yanjun , Al Viro , Christian Brauner Subject: [PATCH v2 3/6] sysctl/coda: Fixes timeout bounds Date: Mon, 24 Feb 2025 10:58:18 +0100 Message-ID: <20250224095826.16458-4-nicolas.bouchinet@clip-os.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250224095826.16458-1-nicolas.bouchinet@clip-os.org> References: <20250224095826.16458-1-nicolas.bouchinet@clip-os.org> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -60 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdejkeegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegoufhorhhtvggutfgvtghiphdvucdlgedtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpehnihgtohhlrghsrdgsohhutghhihhnvghtsegtlhhiphdqohhsrdhorhhgnecuggftrfgrthhtvghrnhepteehfeetkeeujeethfehieelhfejfeduteejieelveegfeefieeuheeiteethfevnecukfhppeeltddrieefrddvgeeirddukeejnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepledtrdeifedrvdegiedrudekjedphhgvlhhopegrrhgthhhlihhnuhigrddrpdhmrghilhhfrhhomhepnhhitgholhgrshdrsghouhgthhhinhgvthestghlihhpqdhoshdrohhrghdpnhgspghrtghpthhtohepvdejpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrhgumhgrsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqshgtshhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheptghouggrlhhishhtsegtohgurgdrtghsrdgtmhhurdgvughupdhrt ghpthhtoheplhhinhhugidqnhhfshesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehnihgtohhlrghsrdgsohhutghhihhnvghtsehsshhirdhgohhuvhdrfhhrpdhrtghpthhtohepjhdrghhrrghnrgguohhssehsrghmshhunhhgrdgtohhmpdhrtghpthhtoheptghlvghmvghnsheslhgrughishgthhdruggv 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. Signed-off-by: Nicolas Bouchinet --- fs/coda/sysctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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",