diff options
author | Nicolas Pitre <nico@fluxnic.net> | 2020-03-28 22:25:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 15:46:30 +0200 |
commit | 9a98e7a80f95378c9ee0c644705e3b5aa54745f1 (patch) | |
tree | 0cb2689f274fa61f093e60a89f4f1c47b4aca8b3 /drivers/extcon | |
parent | 66bb1c9518e623235cbaa7832c919eb4fe586cae (diff) | |
download | linux-9a98e7a80f95378c9ee0c644705e3b5aa54745f1.tar.bz2 |
vt: don't use kmalloc() for the unicode screen buffer
Even if the actual screen size is bounded in vc_do_resize(), the unicode
buffer is still a little more than twice the size of the glyph buffer
and may exceed MAX_ORDER down the kmalloc() path. This can be triggered
from user space.
Since there is no point having a physically contiguous buffer here,
let's avoid the above issue as well as reducing pressure on high order
allocations by using vmalloc() instead.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Cc: <stable@vger.kernel.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.2003282214210.2671@knanqh.ubzr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/extcon')
0 files changed, 0 insertions, 0 deletions