]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: limit terminal size to 4M chars
authorDmitry Vyukov <dvyukov@google.com>
Fri, 14 Oct 2016 13:18:28 +0000 (15:18 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 24 Nov 2016 15:23:23 +0000 (16:23 +0100)
commit0607572b7a37825722745ad52f3cd2b4bbc75bf5
tree8ab207f97943a15f954fa271ca4df8db5b450bcb
parente4813db38f95b5b8b70416d08e5f404650fff32b
tty: limit terminal size to 4M chars

commit 32b2921e6a7461fe63b71217067a6cf4bddb132f upstream.

Size of kmalloc() in vc_do_resize() is controlled by user.
Too large kmalloc() size triggers WARNING message on console.
Put a reasonable upper bound on terminal size to prevent WARNINGs.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
CC: David Rientjes <rientjes@google.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Cc: syzkaller@googlegroups.com
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/tty/vt/vt.c