Patchwork [1/1] hvc_console: fix: hp->ws winsize check runs out-of-sync

login
register
mail settings
Submitter Hendrik Brueckner
Date Nov. 18, 2008, 11:28 a.m.
Message ID <20081118113848.945650506@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/9408/
State Accepted, archived
Commit 7947cf0dd4b6a2bb06c57971502fb81c76a66f2d
Delegated to: Paul Mackerras
Headers show

Comments

Hendrik Brueckner - Nov. 18, 2008, 11:28 a.m.
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>

The test to check for a new winsize runs out-of-sync with the underlying
tty. After a tty has been released and initialized again, the winsize might
Paul Mackerras - Dec. 3, 2008, 9:17 a.m.
Hendrik Brueckner writes:

> From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
> 
> The test to check for a new winsize runs out-of-sync with the underlying
> tty. After a tty has been released and initialized again, the winsize might
> differ between the tty and the hp struct. 
> The solution is to simply remove the check and always schedule the resize work.

Looks OK.  Is this going to go in via the s390 tree, or should I put
it in the powerpc tree?

Paul.
Hendrik Brueckner - Dec. 3, 2008, 9:28 a.m.
Hi Paul,

On Wed, Dec 03, 2008 at 08:17:13PM +1100, Paul Mackerras wrote:
> Looks OK.  Is this going to go in via the s390 tree, or should I put
> it in the powerpc tree?
The patch should go via the powerpc tree.

Thanks and regards,
Hendrik

Patch

differ between the tty and the hp struct. 
The solution is to simply remove the check and always schedule the resize work.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 drivers/char/hvc_console.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -689,10 +689,8 @@  EXPORT_SYMBOL_GPL(hvc_poll);
  */
 void hvc_resize(struct hvc_struct *hp, struct winsize ws)
 {
-	if ((hp->ws.ws_row != ws.ws_row) || (hp->ws.ws_col != ws.ws_col)) {
-		hp->ws = ws;
-		schedule_work(&hp->tty_resize);
-	}
+	hp->ws = ws;
+	schedule_work(&hp->tty_resize);
 }
 
 /*