pstore/ram: verify ramoops header before saving record
authorBen Zhang <benzh@chromium.org>
Thu, 21 May 2015 16:50:34 +0000 (09:50 -0700)
committerTony Luck <tony.luck@intel.com>
Thu, 21 May 2015 16:50:34 +0000 (09:50 -0700)
On some devices the persistent memory contains junk after a cold boot,
and /dev/pstore/dmesg-ramoops-* are created with random data which is
not the result of a kernel crash.

This patch adds a ramoops header check and skips any
persistent_ram_zone that does not have a valid header.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/ram.c

diff --cc fs/pstore/ram.c
Simple merge