aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/mft.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-08-17 15:44:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-17 16:20:27 -0700
commit2c27ce915078a5822aefb5db7bc2481664b26044 (patch)
tree7c735100cf589ffd9f00d8cd7b8b07c54dc9408f /fs/ntfs/mft.c
parentntfs: aops: remove VLA usage (diff)
downloadlinux-dev-2c27ce915078a5822aefb5db7bc2481664b26044.tar.xz
linux-dev-2c27ce915078a5822aefb5db7bc2481664b26044.zip
ntfs: decompress: remove VLA usage
In the quest to remove all stack VLA usage from the kernel[1], this moves the stack buffer used during decompression to be allocated externally. The existing "dest_max_index" used in the VLA is bounded by cb_max_page. cb_max_page is bounded by max_page, and max_page is bounded by nr_pages. Since nr_pages is used for the "pages" allocation, it can similarly be used for the "completed_pages" allocation and passed into the decompression function. The error paths are updated to free the new allocation. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Link: http://lkml.kernel.org/r/20180626172909.41453-3-keescook@chromium.org Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Anton Altaparmakov <anton@tuxera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions