Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pstore: Fix linking when crypto API disabled
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 <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Fixes: cb3bee0 ("pstore: Use crypto compress API") Cc: [email protected] Signed-off-by: Kees Cook <[email protected]>
- Loading branch information