vt: perform safe console erase in the right order
mainline inclusion from mainline-5.0 commit a6dbe4427559 category: bugfix bugzilla: 11870 CVE: NA ------------------------------------------------- Commit 4b4ecd9c ("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: NMatthew Whitehead <tedheadster@gmail.com> Signed-off-by: NNicolas Pitre <nico@linaro.org> Tested-by: NMatthew Whitehead <tedheadster@gmail.com> Fixes: 4b4ecd9c ("vt: Perform safe console erase only once") Cc: stable@vger.kernel.org Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NHongbo Yao <yaohongbo@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录