Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45b0a5af authored by Aleksandr Yashkin's avatar Aleksandr Yashkin Committed by Greg Kroah-Hartman
Browse files

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: default avatarAleksandr Yashkin <a.yashkin@inango-systems.com>
Signed-off-by: default avatarNikolay Merinov <n.merinov@inango-systems.com>
Signed-off-by: default avatarAriel Gilman <a.gilman@inango-systems.com>
Link: https://lore.kernel.org/r/20191223133816.28155-1-n.merinov@inango-systems.com


Fixes: 896fc1f0 ("pstore/ram: Switch to persistent_ram routines")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent abb59358
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment