commit | 20fe935358de5f3481790f3e3d399cf97801f830 | [log] [tgz] |
---|---|---|
author | Kees Cook <keescook@chromium.org> | Thu Jun 14 15:27:27 2018 -0700 |
committer | Linus Torvalds <torvalds@linux-foundation.org> | Fri Jun 15 07:55:24 2018 +0900 |
tree | 23b329ff76a3a59d218ea7d48eb63123100adebe | |
parent | 86a2bb5ad83161cc687671bdf188699e137ae226 [diff] |
exofs: avoid VLA in structures On the quest to remove all VLAs from the kernel[1] this adjusts several cases where allocation is made after an array of structures that points back into the allocation. The allocations are changed to perform explicit calculations instead of using a Variable Length Array in a structure. Additionally, this lets Clang compile this code now, since Clang does not support VLAIS[2]. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com [2] https://lkml.kernel.org/r/CA+55aFy6h1c3_rP_bXFedsTXzwW+9Q9MfJaW7GUmMBrAp-fJ9A@mail.gmail.com [keescook@chromium.org: v2] Link: http://lkml.kernel.org/r/20180418163546.GA45794@beast Link: http://lkml.kernel.org/r/20180327203904.GA1151@beast Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Cc: Boaz Harrosh <ooo@electrozaur.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>