diff options
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index e64f0bf3624e..c71d1d0f13b9 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -909,15 +909,21 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
909 | 909 | ||
910 | if (vc->vc_tty) { | 910 | if (vc->vc_tty) { |
911 | struct winsize ws, *cws = &vc->vc_tty->winsize; | 911 | struct winsize ws, *cws = &vc->vc_tty->winsize; |
912 | unsigned long flags; | ||
912 | 913 | ||
913 | memset(&ws, 0, sizeof(ws)); | 914 | memset(&ws, 0, sizeof(ws)); |
914 | ws.ws_row = vc->vc_rows; | 915 | ws.ws_row = vc->vc_rows; |
915 | ws.ws_col = vc->vc_cols; | 916 | ws.ws_col = vc->vc_cols; |
916 | ws.ws_ypixel = vc->vc_scan_lines; | 917 | ws.ws_ypixel = vc->vc_scan_lines; |
918 | |||
919 | mutex_lock(&vc->vc_tty->termios_mutex); | ||
920 | spin_lock_irqsave(&vc->vc_tty->ctrl_lock, flags); | ||
917 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) && | 921 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) && |
918 | vc->vc_tty->pgrp) | 922 | vc->vc_tty->pgrp) |
919 | kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); | 923 | kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); |
924 | spin_unlock_irqrestore(&vc->vc_tty->ctrl_lock, flags); | ||
920 | *cws = ws; | 925 | *cws = ws; |
926 | mutex_unlock(&vc->vc_tty->termios_mutex); | ||
921 | } | 927 | } |
922 | 928 | ||
923 | if (CON_IS_VISIBLE(vc)) | 929 | if (CON_IS_VISIBLE(vc)) |