Skip to content

Commit

Permalink
tty: fix a little bug in scrup, vt.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Pan authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent fadf34f commit 962400e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 962400e

Please sign in to comment.