[PATCH] fs: fix proc_handler for sysctl_nr_open

Jinliang Zheng posted 1 patch 1 year, 2 months ago
fs/file_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] fs: fix proc_handler for sysctl_nr_open
Posted by Jinliang Zheng 1 year, 2 months ago
Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle
sysctl_nr_open, because its data type is unsigned int, not int.

Fixes: 9b80a184eaad ("fs/file: more unsigned file descriptors")
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
---
 fs/file_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index 976736be47cb..502b81f614d9 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -128,7 +128,7 @@ static struct ctl_table fs_stat_sysctls[] = {
 		.data		= &sysctl_nr_open,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
+		.proc_handler	= proc_douintvec_minmax,
 		.extra1		= &sysctl_nr_open_min,
 		.extra2		= &sysctl_nr_open_max,
 	},
-- 
2.41.1
Re: [PATCH] fs: fix proc_handler for sysctl_nr_open
Posted by Christian Brauner 1 year, 2 months ago
On Sun, 24 Nov 2024 11:46:36 +0800, Jinliang Zheng wrote:
> Use proc_douintvec_minmax() instead of proc_dointvec_minmax() to handle
> sysctl_nr_open, because its data type is unsigned int, not int.
> 
> 

Applied to the vfs-6.14.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.14.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.14.misc

[1/1] fs: fix proc_handler for sysctl_nr_open
      https://git.kernel.org/vfs/vfs/c/d6528c80de02