tty: Fix GPF in flush_to_ldisc(), part 2
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Jan 2016 04:36:12 +0000 (20:36 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:50:33 +0000 (08:50 -0400)
commit3beac2b0bffd8e977ef1d464dd424f22af965a96
tree0d3fcc9aa72a9f10bc971a281898b18e82743460
parentd3e5b294c6a3e78b9a544eede572e239555224db
tty: Fix GPF in flush_to_ldisc(), part 2

[ Upstream commit f33798deecbd59a2955f40ac0ae2bc7dff54c069 ]

commit 9ce119f318ba ("tty: Fix GPF in flush_to_ldisc()") fixed a
GPF caused by a line discipline which does not define a receive_buf()
method.

However, the vt driver (and speakup driver also) pushes selection
data directly to the line discipline receive_buf() method via
tty_ldisc_receive_buf(). Fix the same problem in tty_ldisc_receive_buf().

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
include/linux/tty.h