pty: Fix overlimit memory use
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 16 Jan 2015 20:22:14 +0000 (15:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Feb 2015 18:11:25 +0000 (10:11 -0800)
commitc81622ac4282b0183e738e192c91fabe4a782715
tree51e88cfcab3db5b04d7afb4ac1d1b51ded21b165
parent6ecde472b0d943251f8f348155495391720b61b0
pty: Fix overlimit memory use

The pty_space() computation is broken; the space already consumed
in the tty buffer is not accounted for.

Use tty_buffer_set_limit(), which enforces the limit automatically.

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