tty: Handle problem if line discipline does not have receive_buf
commita358f0becce04eed99eb50111f4cc22b25792de8
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Jan 2019 09:46:58 +0000 (20 10:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:13:43 +0000 (31 08:13 +0100)
treedf66dce34ab8db66e12a1845f0e908a133d6fded
parent5e405657e13a69c260c532f7ecd02e975d49e6fc
tty: Handle problem if line discipline does not have receive_buf

commit 27cfb3a53be46a54ec5e0bd04e51995b74c90343 upstream.

Some tty line disciplines do not have a receive buf callback, so
properly check for that before calling it.  If they do not have this
callback, just eat the character quietly, as we can't fail this call.

Reported-by: Jann Horn <jannh@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c