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, 30 Jan 2019 08:31:30 +0000 (09:31 +0100)
commit7c0cca7c847e6e019d67b7d793efbbe3b947d004
tree7335a325bd870d4fd9d73ae1b9fb25ed33c562b2
parent83b21ed0fc2a7b17c6b9d4f72f664841f797380b
tty: ldisc: add sysctl to prevent autoloading of ldiscs

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