Skip to content

Commit fd1896d

Browse files
hdellergregkh
authored andcommitted
Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()"
commit e4fc307 upstream. This reverts commit 864f996. The patch is wrong as it checks vc_origin against vc_screenbuf, while in text mode it should compare against vga_vram_base. As such it broke VGA text scrolling, which can be reproduced like this: (1) boot a kernel that is configured to use text mode VGA-console (2) type commands: ls -l /usr/bin | less -S (3) scroll up/down with cursor-down/up keys Reported-by: Jari Ruusu <jariruusu@protonmail.com> Cc: stable@vger.kernel.org Cc: Yi Yang <yiyang13@huawei.com> Cc: GONG Ruiqi <gongruiqi1@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 26f8402 commit fd1896d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/console/vgacon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b,
11681168
c->vc_screenbuf_size - delta);
11691169
c->vc_origin = vga_vram_end - c->vc_screenbuf_size;
11701170
vga_rolled_over = 0;
1171-
} else if (oldo - delta >= (unsigned long)c->vc_screenbuf)
1171+
} else
11721172
c->vc_origin -= delta;
11731173
c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
11741174
scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char,

0 commit comments

Comments
 (0)