Kees Cook f6f66c1bf5 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>
2018-04-11 10:28:35 -07:00
..
2017-12-22 19:39:09 +11:00
2018-04-07 12:08:19 -07:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2018-02-06 18:32:44 -08:00
2018-01-01 12:40:27 -07:00
2018-02-06 18:32:44 -08:00
2017-10-07 10:45:14 -06:00
2017-02-24 17:46:57 -08:00
2018-02-26 14:39:30 -05:00
2018-03-21 17:18:34 -05:00
2018-02-06 18:32:47 -08:00
2018-03-27 11:15:42 +02:00
2017-12-01 13:09:40 -08:00
2017-12-01 13:09:40 -08:00
2016-12-06 10:17:03 +02:00
2018-02-21 15:35:43 -08:00
2018-03-31 23:25:39 -04:00
2017-12-01 13:09:40 -08:00
2017-08-15 09:02:07 -07:00