]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: ldisc: add sysctl to prevent autoloading of ldiscs
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jan 2019 16:26:42 +0000 (17:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:39:45 +0000 (08:39 +0200)
commitc231b6b0064de12f19e9d19384b33acf14d43b94
treedaf00b2ba17eb8c110aab9a4319d9e31d67e238c
parente4ebae16792ad736add8a40645ecdf42afaba85e
tty: ldisc: add sysctl to prevent autoloading of ldiscs

commit 7c0cca7c847e6e019d67b7d793efbbe3b947d004 upstream.

By default, the kernel will automatically load the module of any line
dicipline that is asked for.  As this sometimes isn't the safest thing
to do, provide a sysctl to disable this feature.

By default, we set this to 'y' as that is the historical way that Linux
has worked, and we do not want to break working systems.  But in the
future, perhaps this can default to 'n' to prevent this functionality.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/Kconfig
drivers/tty/tty_io.c
drivers/tty/tty_ldisc.c