linux-stable/fs/pstore
Matteo Croce 17f9ba7229 pstore: Fix linking when crypto API disabled
commit fd49e03280 upstream.

When building a kernel with CONFIG_PSTORE=y and CONFIG_CRYPTO not set,
a build error happens:

    ld: fs/pstore/platform.o: in function `pstore_dump':
    platform.c:(.text+0x3f9): undefined reference to `crypto_comp_compress'
    ld: fs/pstore/platform.o: in function `pstore_get_backend_records':
    platform.c:(.text+0x784): undefined reference to `crypto_comp_decompress'

This because some pstore code uses crypto_comp_(de)compress regardless
of the CONFIG_CRYPTO status. Fix it by wrapping the (de)compress usage
by IS_ENABLED(CONFIG_PSTORE_COMPRESS)

Signed-off-by: Matteo Croce <mcroce@linux.microsoft.com>
Link: https://lore.kernel.org/lkml/20200706234045.9516-1-mcroce@linux.microsoft.com
Fixes: cb3bee0369 ("pstore: Use crypto compress API")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-19 08:16:27 +02:00
..
ftrace.c pstore: no need to check return value of debugfs_create functions 2019-07-08 21:04:42 -07:00
inode.c pstore: pstore_ftrace_seq_next should increase position index 2020-04-17 10:50:12 +02:00
internal.h
Kconfig
Makefile
platform.c pstore: Fix linking when crypto API disabled 2020-08-19 08:16:27 +02:00
pmsg.c
ram.c pstore/ram: Regularize prz label allocation lifetime 2020-01-14 20:08:28 +01:00
ram_core.c pstore/ram: Regularize prz label allocation lifetime 2020-01-14 20:08:28 +01:00