diff options
author | Nicolas Bouchinet <[email protected]> | 2024-11-12 14:13:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-11-13 15:12:19 +0100 |
commit | 635a9fca54f4f4148be1ae1c7c6bd37af80f5773 (patch) | |
tree | 4f5fe0b2d3f23bc0c36b759a680bbe37575e46c2 | |
parent | 166105c9030a30ba08574a9998afc7b60bc72dd7 (diff) |
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
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]>
-rw-r--r-- | drivers/tty/tty_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 9771072da177..dcb1769c3625 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3631,7 +3631,7 @@ static struct ctl_table tty_table[] = { .data = &tty_ldisc_autoload, .maxlen = sizeof(tty_ldisc_autoload), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, |