Revert "tty: fix a little bug in scrup, vt.c"
This reverts commit 962400e8, which was entirely bogus. The code used to multiply the character offset by "vc->vc_cols", and that's actually correct, because 'd' itself is an 'unsigned short'. So the pointer arithmetic already takes the size of a VGA character into account. Changing it to use vc_size_row (which is just "vc_cols" shifted up to take the size of the character into account) ends up multiplying with the VGA character size twice. This got reported as bugs for various other subsystems, because what it actually results in is writing the 16-bit vc_video_erase_char pattern (usually 0x0720: 0x07 is the default attribute, 0x20 is ASCII space) into some random other allocation. So Markus ended up reporting this as a ext4 bug, while to Torsten Kaiser it looked like a problem with KMS or libata. Jeff Chua saw it in different places. And finally - Justin Mattock had slab poisoning enabled, and saw it as a slab poison overwritten. And bisected and reverted this to verify the buggy commit. Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de> Reported-by: NTorsten Kaiser <just.for.lkml@googlemail.com> Reported-by: NJeff Chua <jeff.chua.linux@gmail.com> Reported-by: NJustin P. Mattock <justinmattock@gmail.com> Reported-bisected-and-tested-by: NJustin P. Mattock <justinmattock@gmail.com> Acked-by: NDave Airlie <airlied@redhat.com> Cc: Frank Pan <frankpzh@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录