From: Alan Cox Date: Mon, 13 Oct 2008 09:39:01 +0000 (+0100) Subject: tty: compare the tty winsize X-Git-Tag: v2.6.28-rc1~651 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4d2a6c2096b764decb20070b1bf4356de9144a8;p=linux-2.6-omap-h63xx.git tty: compare the tty winsize We always use the real tty one for stuff so the pty one should not be compared. As we propagate window changes to both it doesn't currently matter but will when we tidy up the pty termios logic a bit more Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index ac53d7f9b5d..9a76db3cda1 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -2133,7 +2133,7 @@ int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, /* For a PTY we need to lock the tty side */ mutex_lock(&real_tty->termios_mutex); - if (!memcmp(ws, &tty->winsize, sizeof(*ws))) + if (!memcmp(ws, &real_tty->winsize, sizeof(*ws))) goto done; /* Get the PID values and reference them so we can avoid holding the tty ctrl lock while sending signals */