summaryrefslogtreecommitdiffstats
path: root/fs/tracefs
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2018-08-18 00:44:11 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-18 01:20:27 +0200
commit2c27ce915078a5822aefb5db7bc2481664b26044 (patch)
tree7c735100cf589ffd9f00d8cd7b8b07c54dc9408f /fs/tracefs
parentntfs: aops: remove VLA usage (diff)
downloadlinux-2c27ce915078a5822aefb5db7bc2481664b26044.tar.xz
linux-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 'fs/tracefs')
0 files changed, 0 insertions, 0 deletions