aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <[email protected]>2020-08-04 13:22:38 -0700
committerLinus Torvalds <[email protected]>2020-08-04 13:22:38 -0700
commit19a93823cf63d44d04c7571152087f12cb2199e6 (patch)
treeab6ce4faa8f7bf8d2acee29da0876cf32b530aa8 /fs
parentrandom32: move the pseudo-random 32-bit definitions to prandom.h (diff)
parentpstore: Fix linking when crypto API disabled (diff)
downloadwireguard-linux-19a93823cf63d44d04c7571152087f12cb2199e6.tar.xz
wireguard-linux-19a93823cf63d44d04c7571152087f12cb2199e6.zip
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
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/platform.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index a9e297eefdff..36714df37d5d 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -269,6 +269,9 @@ static int pstore_compress(const void *in, void *out,
{
int ret;
+ if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION))
+ return -EINVAL;
+
ret = crypto_comp_compress(tfm, in, inlen, out, &outlen);
if (ret) {
pr_err("crypto_comp_compress failed, ret = %d!\n", ret);
@@ -668,7 +671,7 @@ static void decompress_record(struct pstore_record *record)
int unzipped_len;
char *unzipped, *workspace;
- if (!record->compressed)
+ if (!IS_ENABLED(CONFIG_PSTORE_COMPRESSION) || !record->compressed)
return;
/* Only PSTORE_TYPE_DMESG support compression. */
OSZAR »