]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Oct 2016 14:41:56 +0000 (16:41 +0200)
commit32b2921e6a7461fe63b71217067a6cf4bddb132f
treef5407accc9e39ef82d4abe0b459ef666f8b30e18
parentd704b2d32c39c256dea659e142a31b875a13c63b
tty: limit terminal size to 4M chars

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
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c