summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_dp_helper.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-03-13 09:31:51 -0500
committerEric Anholt <eric@anholt.net>2018-03-16 15:51:52 -0700
commit0126b23c552c2bf9aa62a6cabce8c10e983ef436 (patch)
tree00c1ccf452341ceb3c40a35b5490c8cd1acc84a4 /include/drm/drm_dp_helper.h
parent2f0e9d804935970a4ce0f58dd046b41881bfd8f3 (diff)
downloadlinux-stable-0126b23c552c2bf9aa62a6cabce8c10e983ef436.tar.gz
linux-stable-0126b23c552c2bf9aa62a6cabce8c10e983ef436.tar.bz2
linux-stable-0126b23c552c2bf9aa62a6cabce8c10e983ef436.zip
drm/vc4_validate: Remove VLA usage
In preparation to enabling -Wvla, remove VLA. In this particular case use macro ARRAY_SIZE so the length of array _bo_ can be computed at preprocessing time. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves it is easy to lose track of how big a VLA can get. Thus, we can end up having runtime failures that are hard to debug. Also, fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20180313143151.GA27486@embeddedgus
Diffstat (limited to 'include/drm/drm_dp_helper.h')
0 files changed, 0 insertions, 0 deletions