]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sysctl: clarify proc_douintvec_minmax doc
authorJoel Granados <joel.granados@kernel.org>
Fri, 28 Nov 2025 21:47:54 +0000 (22:47 +0100)
committerJoel Granados <joel.granados@kernel.org>
Mon, 5 Jan 2026 13:10:32 +0000 (14:10 +0100)
Specify that the range check is only when assigning kernel variable

Signed-off-by: Joel Granados <joel.granados@kernel.org>
kernel/sysctl.c

index e9bc1161ecfb0cfe3da1f78b77fc0121951b58b5..4ea56c71c7ef7c871dfbf4f64bf79c7cd46588e1 100644 (file)
@@ -692,10 +692,10 @@ int proc_dointvec_minmax(const struct ctl_table *table, int dir,
  * values from/to the user buffer, treated as an ASCII string. Negative
  * strings are not allowed.
  *
- * This routine will ensure the values are within the range specified by
- * table->extra1 (min) and table->extra2 (max). There is a final sanity
- * check for UINT_MAX to avoid having to support wrap around uses from
- * userspace.
+ * When changing the kernel variable, this routine will ensure the values
+ * are within the range specified by table->extra1 (min) and table->extra2
+ * (max). And Check that the values are less than UINT_MAX to avoid having to
+ * support wrap around uses from userspace.
  *
  * Returns 0 on success or -ERANGE when range check failes and
  * SYSCTL_USER_TO_KERN(dir) == true