]> git.baikalelectronics.ru Git - kernel.git/commit
n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 11 Feb 2014 16:49:58 +0000 (11:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 17:57:33 +0000 (09:57 -0800)
commitd733ad5246474ba243a1ab93c1c56f9eedf0c9dc
tree6fdf15d799b171f51e602cdfb5bcf277aa04338f
parent447465e30886a4f8d332e15d3b428ca8e8a07f64
n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0

Commit 68ed6161090d6b648542bfa7707e2f3e5d69863e,
  n_tty: Refactor input_available_p() by call site
broke poll() when TIME_CHAR(tty) and MIN_CHAR(tty) are both 0.

When TIME_CHAR and MIN_CHAR are both 0, input is available if the
read_cnt is 1 (not 0).

Reported-by: Eric Dumazet <edumazet@google.com>
Tested-by: Eric Dumazet <edumazet@google.com>
Reported-by: Stephane Eranian <eranian@google.com>
Tested-by: David Ahern <dsahern@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c