diff options
author | Kees Cook <keescook@chromium.org> | 2018-04-11 01:32:54 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-11 19:28:35 +0200 |
commit | f6f66c1bf53079ce1f0789c8b482fba35b81617d (patch) | |
tree | f6660b3a670c905f8f49e68ba6625c39be3bae56 /lib/test_ubsan.c | |
parent | lib/Kconfig.debug: Debug Lockups and Hangs: keep SOFTLOCKUP options together (diff) | |
download | linux-f6f66c1bf53079ce1f0789c8b482fba35b81617d.tar.xz linux-f6f66c1bf53079ce1f0789c8b482fba35b81617d.zip |
lib/test_bitmap.c: do not accidentally use stack VLA
This avoids an accidental stack VLA (since the compiler thinks the value
of "len" can change, even when marked "const"). This just replaces it
with a #define so it will DTRT.
Seen with -Wvla. Fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Link: http://lkml.kernel.org/r/20180307212555.GA17927@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Yury Norov <ynorov@caviumnetworks.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/test_ubsan.c')
0 files changed, 0 insertions, 0 deletions