Skip to content

Commit

Permalink
pstore: Fix typo in compression option name
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: fd49e03 ("pstore: Fix linking when crypto API disabled")
Acked-by: Matteo Croce <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
jiribohac authored and kees committed Feb 18, 2021
1 parent f40ddce commit 19d8e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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);
Expand Down Expand Up @@ -671,7 +671,7 @@ static void decompress_record(struct pstore_record *record)
int unzipped_len;
char *unzipped, *workspace;

if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION) || !record->compressed)
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESS) || !record->compressed)
return;

/* Only PSTORE_TYPE_DMESG support compression. */
Expand Down

0 comments on commit 19d8e91

Please sign in to comment.