Skip to contentSkip to conversation

hvc_console: fix: remove duplicate hp->ws winsize check

PATCH In review Hendrik Brueckner 2 participants 4 messages Nov 18, 2008 – Dec 3, 2008 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

cover hvc_console: fix: remove duplicate hp->ws winsize check

Hello,

this patch fixes a hvc terminal resize problem by removing a duplicate winsize comparison.

Ben, could you add this patch to your tree for 2.6.28-rc6 bug fixes?

Thanks and regards,
Hendrik

Signature · 10 lines
Hendrik Brueckner
D/3303 Linux on System z Development
eMail: [email protected]
IBM Deutschland Research & Development GmbH, Schoenaicher Str. 220, 71032 Boeblingen

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Erich Baier
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
#1 lore raw

PATCH 1/1 hvc_console: fix: hp->ws winsize check runs out-of-sync

From: Hendrik Brueckner <[email protected]>

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.

---
 drivers/char/hvc_console.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/char/hvc_console.c +2 -4
@@ -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);
 }
 
 /*
Signature · 12 lines
Hendrik Brueckner
D/3303 Linux on System z Development
Tel: +49 7031 16-1073
Fax: +49 7031 16-3456
eMail: [email protected]
IBM Deutschland Research & Development GmbH, Schoenaicher Str. 220, 71032 Boeblingen

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Erich Baier
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
#2 lore raw

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

Quoted 6 lines · Hendrik Brueckner

From: Hendrik Brueckner <[email protected]>

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.

#3 lore raw

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

Hi Paul,

Quoted 2 lines · Paul Mackerras

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