summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-03-15 10:14:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-18 09:43:35 +0100
commit97885140bf64b43adee76e23179eae9bd1393296 (patch)
tree4a3d804428f2eb42e294b3d3c1deaf81f52def8f /include
parent478035df0705687cf3cfbb32644f434353189672 (diff)
downloadbarebox-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.h1
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 {