tty: fix a little bug in scrup, vt.c
authorFrank Pan <frankpzh@gmail.com>
Wed, 26 May 2010 07:37:43 +0000 (15:37 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Jun 2010 20:37:18 +0000 (13:37 -0700)
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/vt.c

index 7cdb6ee569cd7ca592bedfea458f0b676ec937af..1296c42ed5c627d876adf3bc75e4e1a665cc8a1d 100644 (file)
@@ -304,7 +304,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
        d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
        s = (unsigned short *)(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);
 }