diff options
| author | David S. Miller <davem@davemloft.net> | 2015-12-03 21:03:21 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-12-03 21:09:12 -0500 |
| commit | f188b951f33a0464338f94f928338f84fc0e4392 (patch) | |
| tree | 17ad63719242b1de0266627a1dc92ba869a3ba4e /drivers/tty/tty_io.c | |
| parent | 6b20da4d8f3f6a3be9f67e3207f435cfaa5f7f97 (diff) | |
| parent | 071f5d105a0ae93aeb02197c4ee3557e8cc57a21 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/renesas/ravb_main.c
kernel/bpf/syscall.c
net/ipv4/ipmr.c
All three conflicts were cases of overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/tty/tty_io.c')
| -rw-r--r-- | drivers/tty/tty_io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 0c41dbcb90b8..bcc8e1e8bb72 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1282,18 +1282,22 @@ int tty_send_xchar(struct tty_struct *tty, char ch) int was_stopped = tty->stopped; if (tty->ops->send_xchar) { + down_read(&tty->termios_rwsem); tty->ops->send_xchar(tty, ch); + up_read(&tty->termios_rwsem); return 0; } if (tty_write_lock(tty, 0) < 0) return -ERESTARTSYS; + down_read(&tty->termios_rwsem); if (was_stopped) start_tty(tty); tty->ops->write(tty, &ch, 1); if (was_stopped) stop_tty(tty); + up_read(&tty->termios_rwsem); tty_write_unlock(tty); return 0; } |
