summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/Makefile
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-01-17 15:42:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-02 10:11:27 -0800
commitd2b6f44779d3be22d32a5697bd30b59367fd2b33 (patch)
treed7d607053156ff19c610ed1e9c976156c3ac1050 /drivers/vhost/Makefile
parent1d1d14da12e79a6c05fbe1a975401f0f56c93316 (diff)
downloadblackbird-op-linux-d2b6f44779d3be22d32a5697bd30b59367fd2b33.tar.gz
blackbird-op-linux-d2b6f44779d3be22d32a5697bd30b59367fd2b33.zip
n_tty: Fix signal handling flushes
BRKINT and ISIG requires input and output flush when a signal char is received. However, the order of operations is significant since parallel i/o may be ongoing. Merge the signal handling for BRKINT with ISIG handling. Process the signal first. This ensures any ongoing i/o is aborted; without this, a waiting writer may continue writing after the flush occurs and after the signal char has been echoed. Write lock the termios_rwsem, which excludes parallel writers from pushing new i/o until after the output buffers are flushed; claiming the write lock is necessary anyway to exclude parallel readers while the read buffer is flushed. Subclass the termios_rwsem for ptys since the slave pty performing the flush may appear to reorder the termios_rwsem->tty buffer lock lock order; adding annotation clarifies that slave tty_buffer lock-> slave termios_rwsem -> master tty_buffer lock is a valid lock order. Flush the echo buffer. In this context, the echo buffer is 'output'. Otherwise, the output will appear discontinuous because the output buffer was cleared which contains older output than the echo buffer. Open-code the read buffer flush since the input worker does not need kicking (this is the input worker). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vhost/Makefile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud