]> git.baikalelectronics.ru Git - kernel.git/commit
dm mirror: remove VLA usage
authorKees Cook <keescook@chromium.org>
Wed, 11 Apr 2018 04:43:15 +0000 (21:43 -0700)
committerMike Snitzer <snitzer@redhat.com>
Fri, 4 May 2018 14:35:20 +0000 (10:35 -0400)
commitb9ceeb8af6250d522dfb65fc0d1cfacba9c8657a
treed38714eaabf08f361c6a96467f31f6e94353a07c
parenta89b8e602c7c6be38fdbb613dc01eca56ffc1ada
dm mirror: remove VLA usage

On the quest to remove all VLAs from the kernel[1], this avoids VLAs
in dm-raid1.c by just using the maximum size for the stack arrays.
The nr_mirrors value was already capped at 9, so this makes it a trivial
adjustment to the array sizes.

[1] https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid1.c