diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-06-15 15:14:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 01:43:02 +0200 |
commit | d8c1f929aa8164cd8eaa830068d2fa3159c0764a (patch) | |
tree | 1371cfe90fffdcb7115b39c77e0f729c109efc69 /drivers/tty/tty_io.c | |
parent | n_tty: Separate buffer indices to prevent cache-line sharing (diff) | |
download | linux-d8c1f929aa8164cd8eaa830068d2fa3159c0764a.tar.xz linux-d8c1f929aa8164cd8eaa830068d2fa3159c0764a.zip |
tty: Only guarantee termios read safety for throttle/unthrottle
No tty driver modifies termios during throttle() or unthrottle().
Therefore, only read safety is required.
However, tty_throttle_safe and tty_unthrottle_safe must still be
mutually exclusive; introduce throttle_mutex for that purpose.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 639e24ade9bf..1b32da6f6cdd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3015,6 +3015,7 @@ void initialize_tty_struct(struct tty_struct *tty, tty->session = NULL; tty->pgrp = NULL; mutex_init(&tty->legacy_mutex); + mutex_init(&tty->throttle_mutex); init_rwsem(&tty->termios_rwsem); init_ldsem(&tty->ldisc_sem); init_waitqueue_head(&tty->write_wait); |