android_kernel_samsung_msm8976/fs/pstore
Joel Fernandes (Google) d02d4458e5 pstore/ram: Do not treat empty buffers as valid
[ Upstream commit 30696378f68a9e3dad6bfe55938b112e72af00c2 ]

The ramoops backend currently calls persistent_ram_save_old() even
if a buffer is empty. While this appears to work, it is does not seem
like the right thing to do and could lead to future bugs so lets avoid
that. It also prevents misleading prints in the logs which claim the
buffer is valid.

I got something like:

	found existing buffer, size 0, start 0

When I was expecting:

	no valid data in buffer (sig = ...)

This bails out early (and reports with pr_debug()), since it's an
acceptable state.

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-27 21:53:37 +02:00
..
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
ftrace.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
inode.c fs: push sync_filesystem() down to the file system's remount_fs() 2015-09-16 18:20:11 +05:30
internal.h Import latest Samsung release 2017-04-18 03:43:52 +02:00
platform.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
pmsg.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
ram.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
ram_core.c pstore/ram: Do not treat empty buffers as valid 2019-07-27 21:53:37 +02:00
ss_platform_log.c Import latest Samsung release 2017-04-18 03:43:52 +02:00