]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: raid56: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Tue, 29 May 2018 23:44:59 +0000 (16:44 -0700)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 May 2018 15:15:43 +0000 (17:15 +0200)
commit365b95c9c7e3308b66d19dc8c15adabeab3ef407
tree71087216205118034caf293b8bf84090bc791bac
parenta38880c9bfde7af8f0e33a21bc4abf8806d86d83
btrfs: raid56: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the working buffers during regular init, instead of using stack
space. This refactors the allocation code a bit to make it easier
to review.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c