crypto: tcrypt - Remove VLA usage
authorKees Cook <keescook@chromium.org>
Fri, 27 Apr 2018 02:57:28 +0000 (19:57 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 5 May 2018 06:52:53 +0000 (14:52 +0800)
commit4e234eed58518a8df69a5d14d303b18ed9559832
tree3e1de3cf13e7f764b249f1a37a5a30b29550b3c3
parente99ce921c468ab5d2ccbe17c545061916f3ca82a
crypto: tcrypt - Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this
allocates the return code buffers before starting jiffie timers, rather
than using stack space for the array. Additionally cleans up some exit
paths and make sure that the num_mb module_param() is used only once
per execution to avoid possible races in the value changing.

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

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c