]> git.baikalelectronics.ru Git - kernel.git/commit
vt: perform safe console erase in the right order
authorNicolas Pitre <nicolas.pitre@linaro.org>
Tue, 12 Feb 2019 00:36:41 +0000 (19:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 09:46:11 +0000 (10:46 +0100)
commitf6e6cc492f8c830fd97184683f9f584cfca44719
treec381877f35ba86d3c609e32402ac703a3d82fe87
parent9ed1198b1bef73e935f033746935b383178e817e
vt: perform safe console erase in the right order

Commit bf962a9378f9 ("vt: Perform safe console erase only once") removed
what appeared to be an extra call to scr_memsetw(). This missed the fact
that set_origin() must be called before clearing the screen otherwise
old screen content gets restored on the screen when using vgacon. Let's
fix that by moving all the scrollback handling to flush_scrollback()
where it logically belongs, and invoking it before the actual screen
clearing in csi_J(), making the code simpler in the end.

Reported-by: Matthew Whitehead <tedheadster@gmail.com>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Matthew Whitehead <tedheadster@gmail.com>
Fixes: bf962a9378f9 ("vt: Perform safe console erase only once")
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c