Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

George Kennedy and committed by
Linus Torvalds
46d733d0 32ff6831

+1 -3
+1 -3
drivers/tty/vt/vc_screen.c
··· 414 414 */ 415 415 size = vcs_size(vc, attr, uni_mode); 416 416 if (size < 0) { 417 - if (read) 418 - break; 419 417 ret = size; 420 - goto unlock_out; 418 + break; 421 419 } 422 420 if (pos >= size) 423 421 break;