diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-08-07 07:14:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-08 15:55:25 -0700 |
commit | 57087d515441cab49ff02480aa40a09abfe02c78 (patch) | |
tree | 79c4c9c407bb737a19fdbdcd1e76bb9da737ffab /drivers/tty/serial/8250/8250_hp300.c | |
parent | b216df53848129c969a465bb9237fbc9b8fafaad (diff) |
tty: Fix spurious poll() wakeups
When the N_TTY line discipline receives data and wakes readers to
process the input, polling writers are also mistakenly woken. This
is because, although readers and writers are differentiated by
different wait queues (tty->read_wait & tty->write_wait), both
wait queues are polled together. Thus, reader wakeups without poll
flags still cause poll(POLLOUT) to wakeup.
For received data, wakeup readers with POLLIN. Preserve the
unspecific wakeup in n_tty_packet_mode_flush(), as this action
should flag both POLLIN and POLLOUT.
Fixes epoll_wait() for edge-triggered EPOLLOUT.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_hp300.c')
0 files changed, 0 insertions, 0 deletions