Skip to content

Commit ac3d6a4

Browse files
committed
sysctl: clarify proc_douintvec_minmax doc
Specify that the range check is only when assigning kernel variable Signed-off-by: Joel Granados <joel.granados@kernel.org>
1 parent 11400f8 commit ac3d6a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/sysctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,10 @@ int proc_dointvec_minmax(const struct ctl_table *table, int dir,
692692
* values from/to the user buffer, treated as an ASCII string. Negative
693693
* strings are not allowed.
694694
*
695-
* This routine will ensure the values are within the range specified by
696-
* table->extra1 (min) and table->extra2 (max). There is a final sanity
697-
* check for UINT_MAX to avoid having to support wrap around uses from
698-
* userspace.
695+
* When changing the kernel variable, this routine will ensure the values
696+
* are within the range specified by table->extra1 (min) and table->extra2
697+
* (max). And Check that the values are less than UINT_MAX to avoid having to
698+
* support wrap around uses from userspace.
699699
*
700700
* Returns 0 on success or -ERANGE when range check failes and
701701
* SYSCTL_USER_TO_KERN(dir) == true

0 commit comments

Comments
 (0)