Skip to content

Commit 0e88a78

Browse files
nbouchinet-anssiFerryAr
authored andcommitted
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
commit 635a9fca54f4f4148be1ae1c7c6bd37af80f5773 upstream. Commit 7c0cca7c847e ("tty: ldisc: add sysctl to prevent autoloading of ldiscs") introduces the tty_ldisc_autoload sysctl with the wrong proc_handler. .extra1 and .extra2 parameters are set to avoid other values thant SYSCTL_ZERO or SYSCTL_ONE to be set but proc_dointvec do not uses them. This commit fixes this by using proc_dointvec_minmax instead of proc_dointvec. Fixes: 7c0cca7c847e ("tty: ldisc: add sysctl to prevent autoloading of ldiscs") Cc: stable <[email protected]> Signed-off-by: Nicolas Bouchinet <[email protected]> Reviewed-by: Lin Feng <[email protected]> Reviewed-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ddec12c commit 0e88a78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/tty_ldisc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ static struct ctl_table tty_table[] = {
877877
.data = &tty_ldisc_autoload,
878878
.maxlen = sizeof(tty_ldisc_autoload),
879879
.mode = 0644,
880-
.proc_handler = proc_dointvec,
880+
.proc_handler = proc_dointvec_minmax,
881881
.extra1 = &zero,
882882
.extra2 = &one,
883883
},

0 commit comments

Comments
 (0)