pstore: Fix typo in compression option name

commit 19d8e9149c upstream.

Both pstore_compress() and decompress_record() use a mistyped config
option name ("PSTORE_COMPRESSION" instead of "PSTORE_COMPRESS"). As
a result compression and decompression of pstore records was always
disabled.

Use the correct config option name.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Fixes: fd49e03280 ("pstore: Fix linking when crypto API disabled")
Acked-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210218111547.johvp5klpv3xrpnn@dwarf.suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Bohac 2021-02-18 12:15:47 +01:00 committed by Greg Kroah-Hartman
parent 536618c1bd
commit 90c980ec7f

View file

@ -250,7 +250,7 @@ static int pstore_compress(const void *in, void *out,
{
int ret;
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION))
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESS))
return -EINVAL;
ret = crypto_comp_compress(tfm, in, inlen, out, &outlen);
@ -650,7 +650,7 @@ static void decompress_record(struct pstore_record *record)
int unzipped_len;
char *decompressed;
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION) || !record->compressed)
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESS) || !record->compressed)
return;
/* Only PSTORE_TYPE_DMESG support compression. */