diff options
author | Kees Cook <keescook@chromium.org> | 2019-03-15 10:14:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-18 09:43:35 +0100 |
commit | 97885140bf64b43adee76e23179eae9bd1393296 (patch) | |
tree | 4a3d804428f2eb42e294b3d3c1deaf81f52def8f /include | |
parent | 478035df0705687cf3cfbb32644f434353189672 (diff) | |
download | barebox-97885140bf64b43adee76e23179eae9bd1393296.tar.gz barebox-97885140bf64b43adee76e23179eae9bd1393296.tar.xz |
pstore/ram: Do not use stack VLA for parity workspace
Instead of using a stack VLA for the parity workspace, preallocate a
memory region. The preallocation is done to keep from needing to perform
allocations during crash dump writing, etc. This also fixes a missed
release of librs on free.
Signed-off-by: Kees Cook <keescook@chromium.org>
[p.zabel@pengutronix.de: ported to Barebox from Linux commit f2531f1976d9]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pstore_ram.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 5ef823a57b..ecdd229dd4 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h @@ -29,6 +29,7 @@ struct persistent_ram_ecc_info { int ecc_size; int symsize; int poly; + uint16_t *par; }; struct persistent_ram_zone { |