]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Prevent tty teardown during tty_write_message()
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 11 Oct 2015 00:28:44 +0000 (20:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 04:30:49 +0000 (21:30 -0700)
commit41e54c30d2dce622ba189b40ef872dcf37f0004e
treec32d3b6fd91a8a8af7d498400c6ef3fcd73c7496
parentbcc7d52becca4781382b94440e4ceafeef6814bd
tty: Prevent tty teardown during tty_write_message()

tty_write_message() allows the caller to directly write to a specific
tty. Since the line discipline is bypassed for the direct write,
nothing prevents the tty from being torn down after the tty count is
checked.

Hold the tty lock for the duration of the direct write.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c