[PATCH] A little bug in scrup, vt.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frank Pan
Date: Wednesday, May 26, 2010 - 12:37 am

Greetings

The code uses vc->vc_cols instead of vc->vc_size_row by mistake, it
will cause half of the region which is going to clear remain
uncleared.
The issue happens in background consoles, so it's hard to observe.

Frank Pan

Signed-off-by: Frank Pan <frankpzh@gmail.com>
---
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 2c5ebd4..f523383 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -304,7 +304,7 @@ static void scrup(struct vc_data *vc, unsigned int
t, unsigned int b, int nr)
 	d = (u32 *)(vc->vc_origin + vc->vc_size_row * t);
 	s = (u32 *)(vc->vc_origin + vc->vc_size_row * (t + nr));
 	scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
-	scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char,
+	scr_memsetw(d + (b - t - nr) * vc->vc_size_row, vc->vc_video_erase_char,
 		    vc->vc_size_row * nr);
 }
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] A little bug in scrup, vt.c, Frank Pan, (Wed May 26, 12:37 am)