Skip to content

Commit 190f2ac

Browse files
committed
Merge tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore fix from Kees Cook: "Fix another compression Kconfig combination missed in testing (Tobias Regnery)" * tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: fix crypto dependencies without compression
2 parents fd40ffc + e698aaf commit 190f2ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/pstore/platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static int pstore_decompress(void *in, void *out,
258258

259259
static void allocate_buf_for_compression(void)
260260
{
261-
if (!zbackend)
261+
if (!IS_ENABLED(CONFIG_PSTORE_COMPRESS) || !zbackend)
262262
return;
263263

264264
if (!crypto_has_comp(zbackend->name, 0, 0)) {
@@ -287,7 +287,7 @@ static void allocate_buf_for_compression(void)
287287

288288
static void free_buf_for_compression(void)
289289
{
290-
if (!IS_ERR_OR_NULL(tfm))
290+
if (IS_ENABLED(CONFIG_PSTORE_COMPRESS) && !IS_ERR_OR_NULL(tfm))
291291
crypto_free_comp(tfm);
292292
kfree(big_oops_buf);
293293
big_oops_buf = NULL;

0 commit comments

Comments
 (0)