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:

committed by
Greg Kroah-Hartman

parent
fb7aa03db6
commit
d8c1f929aa
@@ -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 */
|
||||
|
Reference in New Issue
Block a user