Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109220
b: refs/heads/master
c: a152db7
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Aug 27, 2008
1 parent a853ff2 commit 3033754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f753f3272b4d2108d1e4b121ddcde504737a8693
refs/heads/master: a152db71d962f405f7e9be5c818bddf6d1be50a7
7 changes: 4 additions & 3 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2498,7 +2498,7 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
/**
* tty_do_resize - resize event
* @tty: tty being resized
* @real_tty: real tty (if using a pty/tty pair)
* @real_tty: real tty (not the same as tty if using a pty/tty pair)
* @rows: rows (character)
* @cols: cols (character)
*
Expand All @@ -2512,7 +2512,8 @@ int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
struct pid *pgrp, *rpgrp;
unsigned long flags;

mutex_lock(&tty->termios_mutex);
/* For a PTY we need to lock the tty side */
mutex_lock(&real_tty->termios_mutex);
if (!memcmp(ws, &tty->winsize, sizeof(*ws)))
goto done;
/* Get the PID values and reference them so we can
Expand All @@ -2533,7 +2534,7 @@ int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
tty->winsize = *ws;
real_tty->winsize = *ws;
done:
mutex_unlock(&tty->termios_mutex);
mutex_unlock(&real_tty->termios_mutex);
return 0;
}

Expand Down

0 comments on commit 3033754

Please sign in to comment.