pstore: Always allocate buffer for decompression
authorKees Cook <keescook@chromium.org>
Sun, 5 Mar 2017 06:28:46 +0000 (22:28 -0800)
committerKees Cook <keescook@chromium.org>
Tue, 7 Mar 2017 22:00:57 +0000 (14:00 -0800)
commit7e8cc8dce17574e432945fa75882cd401c3ef673
tree4985e01c1ccc67b79a01a56faa6fe33dca7e99a5
parent76cc9580e3fbd323651d06e8184a5a54e0e1066e
pstore: Always allocate buffer for decompression

Currently, pstore_mkfile() performs a memcpy() of the record contents,
so it can live anywhere. However, this is needlessly wasteful. In
preparation of pstore_mkfile() keeping the record contents, always
allocate a buffer for the contents.

Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/platform.c