]> git.baikalelectronics.ru Git - kernel.git/commit
pstore/ram: Strip ramoops header for correct decompression
authorBen Zhang <benzh@chromium.org>
Fri, 31 Oct 2014 00:14:21 +0000 (17:14 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 5 Nov 2014 17:58:17 +0000 (09:58 -0800)
commit5ba4b022d9b11d8a1476ab97f57e13a33979d52e
tree97dbec898efa336bca564174d2311acb35eb2c78
parent07f3e0931c7df93ad87c2836ee1d7614860e3ab2
pstore/ram: Strip ramoops header for correct decompression

pstore compression/decompression was added during 3.12.
The ramoops driver prepends a "====timestamp.timestamp-C|D\n"
header to the compressed record before handing it over to pstore
driver which doesn't know about the header. In pstore_decompress(),
the pstore driver reads the first "==" as a zlib header, so the
decompression always fails. For example, this causes the driver
to write /dev/pstore/dmesg-ramoops-0.enc.z instead of
/dev/pstore/dmesg-ramoops-0.

This patch makes the ramoops driver remove the header before
pstore decompression.

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