vc_screen: modify vcs_size() handling in vcs_read()
authorGeorge Kennedy <george.kennedy@oracle.com>
Mon, 27 Feb 2023 20:21:41 +0000 (15:21 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Feb 2023 00:10:38 +0000 (16:10 -0800)
commit46d733d0efc79bc8430d63b57ab88011806d5180
tree0eb7ac9986ebd3c5e13067765fefedd992dfa16a
parent32ff6831cdecd828bd8be9cdfb6c4a3d1feb8f8a
vc_screen: modify vcs_size() handling in vcs_read()

Restore the vcs_size() handling in vcs_read() to what
it had been in previous version.

Fixes: 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF")
Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/vt/vc_screen.c