]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
authorNicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
Tue, 12 Nov 2024 13:13:31 +0000 (14:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 09:59:39 +0000 (10:59 +0100)
commitb39755107cd27ba70d9e46f1f9a714835d5da307
tree4ba21dfd9c7b0f2405d982320a895ac9d0b5ffe7
parent50473dd3b2a08601a078f852ea05572de9b1f86c
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 <stable@kernel.org>
Signed-off-by: Nicolas Bouchinet <nicolas.bouchinet@ssi.gouv.fr>
Reviewed-by: Lin Feng <linf@wangsu.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20241112131357.49582-4-nicolas.bouchinet@clip-os.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_ldisc.c