kernel-fxtec-pro1x/fs/pstore
Aleksandr Yashkin 903065d53f pstore/ram: Write new dumps to start of recycled zones
commit 9e5f1c19800b808a37fb9815a26d382132c26c3d upstream.

The ram_core.c routines treat przs as circular buffers. When writing a
new crash dump, the old buffer needs to be cleared so that the new dump
doesn't end up in the wrong place (i.e. at the end).

The solution to this problem is to reset the circular buffer state before
writing a new Oops dump.

Signed-off-by: Aleksandr Yashkin <a.yashkin@inango-systems.com>
Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
Signed-off-by: Ariel Gilman <a.gilman@inango-systems.com>
Link: https://lore.kernel.org/r/20191223133816.28155-1-n.merinov@inango-systems.com
Fixes: 896fc1f0c4 ("pstore/ram: Switch to persistent_ram routines")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09 10:19:00 +01:00
..
ftrace.c pstore: Remove write_buf() callback 2017-03-07 14:01:02 -08:00
inode.c pstore: Fix double-free in pstore_mkfile() failure path 2019-09-16 08:22:20 +02:00
internal.h pstore: Centralize init/exit routines 2019-05-22 07:37:45 +02:00
Kconfig pstore: add zstd compression support 2018-08-03 18:12:18 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platform.c pstore/ram: Run without kernel crash dump region 2019-06-11 12:20:52 +02:00
pmsg.c pstore: Create common record initializer 2017-05-31 10:13:44 -07:00
ram.c pstore/ram: Write new dumps to start of recycled zones 2020-01-09 10:19:00 +01:00
ram_core.c pstore/ram: Do not treat empty buffers as valid 2019-01-26 09:32:37 +01:00