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>
This commit is contained in:
Peter Hurley
2013-06-15 09:14:31 -04:00
committed by Greg Kroah-Hartman
parent fb7aa03db6
commit d8c1f929aa
4 changed files with 6 additions and 8 deletions

View File

@@ -244,6 +244,7 @@ struct tty_struct {
struct mutex atomic_write_lock;
struct mutex legacy_mutex;
struct mutex throttle_mutex;
struct rw_semaphore termios_rwsem;
spinlock_t ctrl_lock;
/* Termios values are protected by the termios rwsem */