Skip to content

Commit f08ee39

Browse files
nbouchinet-anssiWen Zhiwei
authored andcommitted
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
stable inclusion from stable-v6.6.64 commit 958275235d404c425f4991576585672127b09e6d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBL4B6 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=958275235d404c425f4991576585672127b09e6d -------------------------------- commit 635a9fca54f4f4148be1ae1c7c6bd37af80f5773 upstream. Commit 7c0cca7 ("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: 7c0cca7 ("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: Wen Zhiwei <[email protected]>
1 parent c237a70 commit f08ee39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/tty_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3607,7 +3607,7 @@ static struct ctl_table tty_table[] = {
36073607
.data = &tty_ldisc_autoload,
36083608
.maxlen = sizeof(tty_ldisc_autoload),
36093609
.mode = 0644,
3610-
.proc_handler = proc_dointvec,
3610+
.proc_handler = proc_dointvec_minmax,
36113611
.extra1 = SYSCTL_ZERO,
36123612
.extra2 = SYSCTL_ONE,
36133613
},

0 commit comments

Comments
 (0)