Skip to content

Commit 19a9382

Browse files
committed
Merge tag 'pstore-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore update from Kees Cook: "A tiny pstore update which fixes a very corner-case build failure: - Fix linking when crypto API disabled (Matteo Croce)" * tag 'pstore-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Fix linking when crypto API disabled
2 parents c0842fb + fd49e03 commit 19a9382

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/pstore/platform.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ static int pstore_compress(const void *in, void *out,
269269
{
270270
int ret;
271271

272+
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION))
273+
return -EINVAL;
274+
272275
ret = crypto_comp_compress(tfm, in, inlen, out, &outlen);
273276
if (ret) {
274277
pr_err("crypto_comp_compress failed, ret = %d!\n", ret);
@@ -668,7 +671,7 @@ static void decompress_record(struct pstore_record *record)
668671
int unzipped_len;
669672
char *unzipped, *workspace;
670673

671-
if (!record->compressed)
674+
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION) || !record->compressed)
672675
return;
673676

674677
/* Only PSTORE_TYPE_DMESG support compression. */

0 commit comments

Comments
 (0)