aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 09:14:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 19:43:01 -0400
commit6a1c0680cf3ba94356ecd58833e1540c93472a57 (patch)
treed370b0888214bb59049181ac98c567d153263f48 /drivers/tty/vt
parenta2f73be8ee36e48f11f89ab705beb3c587a2f320 (diff)
tty: Convert termios_mutex to termios_rwsem
termios is commonly accessed unsafely (especially by N_TTY) because the existing mutex forces exclusive access. Convert existing usage. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/vt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index c677829baa8b..02af6ccefe6a 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -828,7 +828,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
828 * If the caller passes a tty structure then update the termios winsize 828 * If the caller passes a tty structure then update the termios winsize
829 * information and perform any necessary signal handling. 829 * information and perform any necessary signal handling.
830 * 830 *
831 * Caller must hold the console semaphore. Takes the termios mutex and 831 * Caller must hold the console semaphore. Takes the termios rwsem and
832 * ctrl_lock of the tty IFF a tty is passed. 832 * ctrl_lock of the tty IFF a tty is passed.
833 */ 833 */
834 834
@@ -972,7 +972,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows)
972 * the actual work. 972 * the actual work.
973 * 973 *
974 * Takes the console sem and the called methods then take the tty 974 * Takes the console sem and the called methods then take the tty
975 * termios_mutex and the tty ctrl_lock in that order. 975 * termios_rwsem and the tty ctrl_lock in that order.
976 */ 976 */
977static int vt_resize(struct tty_struct *tty, struct winsize *ws) 977static int vt_resize(struct tty_struct *tty, struct winsize *ws)
978{ 978{