]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/sun4i: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Fri, 29 Jun 2018 18:47:40 +0000 (11:47 -0700)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Wed, 4 Jul 2018 15:44:10 +0000 (17:44 +0200)
commitc51756d56e20a12476e4e192b332fac39c1550ca
tree63e46f76fcf6dcb34b2aa30ee5084746d76c195f
parent968d72e6a5105a18fe17c0a8b4ef2951d0eb42dd
drm/sun4i: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
switches to using a kmalloc allocation and moves all the size calculations
to the start to do an allocation. If an upper bounds on the mode timing
calculations could be determined, a fixed stack size could be used instead.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180629184740.GA37415@beast
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c