Thread (14 messages) 14 messages, 3 authors, 2021-12-30

Re: [PATCH 4/9] sysctl: move maxolduid as a sysctl specific const

From: Mickaël Salaün <mic@digikod.net>
Date: 2021-12-30 11:19:55
Also in: lkml


On 30/12/2021 01:46, Andrew Morton wrote:
On Mon, 20 Dec 2021 11:25:41 -0800 Luis Chamberlain [off-list ref] wrote:
quoted
On Fri, Dec 17, 2021 at 05:15:01PM +0100, Mickaël Salaün wrote:
quoted
quoted
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 7dec3d5a9ed4..675b625fa898 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -26,7 +26,7 @@ static const struct file_operations proc_sys_dir_file_operations;
   static const struct inode_operations proc_sys_dir_operations;
   /* shared constants to be used in various sysctls */
-const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX };
+const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 65535, INT_MAX };
The new SYSCTL_MAXOLDUID uses the index 10 of sysctl_vals[] but the same
commit replaces index 8 (SYSCTL_THREE_THOUSAND used by
vm.watermark_scale_factor) instead of adding a new entry.

It should be:
+const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX,
65535 };
Can you send a proper patch which properly fixes this and identifies
the commit name with a Fixes tag. Since thi sis on Andrew's tree no
commit ID is required given that they are ephemeral.
I did this:

From: Andrew Morton <akpm@linux-foundation.org>
Subject: sysctl-move-maxolduid-as-a-sysctl-specific-const-fix

fix sysctl_vals[], per Mickaël.

Cc: Mickaël Salaün <redacted>
Except a typo in my email

Signed-off-by: Mickaël Salaün <mic@digikod.net>

Thanks!
quoted hunk ↗ jump to hunk
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Antti Palosaari <redacted>
Cc: Eric Biederman <redacted>
Cc: Iurii Zaikin <redacted>
Cc: "J. Bruce Fields" <redacted>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Kees Cook <redacted>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Lukas Middendorf <redacted>
Cc: Stephen Kitt <redacted>
Cc: Xiaoming Ni <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

  fs/proc/proc_sysctl.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/proc/proc_sysctl.c~sysctl-move-maxolduid-as-a-sysctl-specific-const-fix
+++ a/fs/proc/proc_sysctl.c
@@ -26,7 +26,7 @@ static const struct file_operations proc
  static const struct inode_operations proc_sys_dir_operations;
  
  /* shared constants to be used in various sysctls */
-const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 65535, INT_MAX };
+const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX, 65535 };
  EXPORT_SYMBOL(sysctl_vals);
  
  const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };
_
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help